From 360301f7dca76bc46213ea7d0b5e2fb68ec1ee89 Mon Sep 17 00:00:00 2001 From: "Hong Li(MSFT)" <74638143+v-hongli1@users.noreply.github.com> Date: Tue, 12 Sep 2023 14:31:46 +0800 Subject: [PATCH] mgmt, update containerregistry to 2023-07-01 (#36688) mgmt, update containerregistry to 2023-07-01 --- sdk/resourcemanager/api-specs.json | 2 +- .../CHANGELOG.md | 8 +- .../assets.json | 2 +- .../pom.xml | 1 + .../fluent/CacheRulesClient.java | 488 ++++++ .../ContainerRegistryManagementClient.java | 14 + .../fluent/CredentialSetsClient.java | 512 ++++++ .../fluent/models/CacheRuleInner.java | 152 ++ .../fluent/models/CacheRuleProperties.java | 139 ++ .../models/CacheRuleUpdateProperties.java | 52 + .../fluent/models/CredentialSetInner.java | 159 ++ .../models/CredentialSetProperties.java | 116 ++ .../models/CredentialSetUpdateProperties.java | 58 + .../WebhookPropertiesCreateParameters.java | 2 +- .../implementation/CacheRulesClientImpl.java | 1480 ++++++++++++++++ ...ContainerRegistryManagementClientImpl.java | 28 + .../CredentialSetsClientImpl.java | 1524 +++++++++++++++++ .../implementation/OperationsClientImpl.java | 4 +- .../PrivateEndpointConnectionsClientImpl.java | 16 +- .../implementation/RegistriesClientImpl.java | 56 +- .../ReplicationsClientImpl.java | 20 +- .../implementation/ScopeMapsClientImpl.java | 20 +- .../implementation/TokensClientImpl.java | 20 +- .../implementation/WebhooksClientImpl.java | 32 +- .../models/AuthCredential.java | 120 ++ .../models/CacheRuleUpdateParameters.java | 68 + .../models/CacheRulesListResult.java | 81 + .../models/CredentialHealth.java | 102 ++ .../models/CredentialHealthStatus.java | 47 + .../models/CredentialName.java | 44 + .../models/CredentialSetListResult.java | 84 + .../models/CredentialSetUpdateParameters.java | 98 ++ .../models/IdentityProperties.java | 26 +- .../models/UserIdentityProperties.java | 30 +- .../generated/AgentPoolsCreateSamples.java | 2 +- .../generated/AgentPoolsDeleteSamples.java | 2 +- .../AgentPoolsGetQueueStatusSamples.java | 2 +- .../generated/AgentPoolsGetSamples.java | 2 +- .../generated/AgentPoolsListSamples.java | 2 +- .../generated/AgentPoolsUpdateSamples.java | 2 +- .../generated/CacheRulesCreateSamples.java | 35 + .../generated/CacheRulesDeleteSamples.java | 25 + .../generated/CacheRulesGetSamples.java | 25 + .../generated/CacheRulesListSamples.java | 25 + .../generated/CacheRulesUpdateSamples.java | 32 + .../CredentialSetsCreateSamples.java | 46 + .../CredentialSetsDeleteSamples.java | 25 + .../generated/CredentialSetsGetSamples.java | 25 + .../generated/CredentialSetsListSamples.java | 25 + .../CredentialSetsUpdateSamples.java | 42 + .../generated/OperationsListSamples.java | 2 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- ...egistriesCheckNameAvailabilitySamples.java | 4 +- .../generated/RegistriesCreateSamples.java | 4 +- .../generated/RegistriesDeleteSamples.java | 2 +- .../RegistriesGenerateCredentialsSamples.java | 2 +- ...istriesGetBuildSourceUploadUrlSamples.java | 2 +- .../RegistriesGetByResourceGroupSamples.java | 2 +- ...gistriesGetPrivateLinkResourceSamples.java | 2 +- .../RegistriesImportImageSamples.java | 6 +- .../RegistriesListByResourceGroupSamples.java | 2 +- .../RegistriesListCredentialsSamples.java | 2 +- ...striesListPrivateLinkResourcesSamples.java | 2 +- .../generated/RegistriesListSamples.java | 2 +- .../RegistriesListUsagesSamples.java | 2 +- ...RegistriesRegenerateCredentialSamples.java | 2 +- .../RegistriesScheduleRunSamples.java | 14 +- .../generated/RegistriesUpdateSamples.java | 2 +- .../generated/ReplicationsCreateSamples.java | 4 +- .../generated/ReplicationsDeleteSamples.java | 2 +- .../generated/ReplicationsGetSamples.java | 2 +- .../generated/ReplicationsListSamples.java | 2 +- .../generated/ReplicationsUpdateSamples.java | 2 +- .../generated/RunsCancelSamples.java | 2 +- .../generated/RunsGetLogSasUrlSamples.java | 2 +- .../generated/RunsGetSamples.java | 2 +- .../generated/RunsListSamples.java | 2 +- .../generated/RunsUpdateSamples.java | 2 +- .../generated/ScopeMapsCreateSamples.java | 2 +- .../generated/ScopeMapsDeleteSamples.java | 2 +- .../generated/ScopeMapsGetSamples.java | 2 +- .../generated/ScopeMapsListSamples.java | 2 +- .../generated/ScopeMapsUpdateSamples.java | 2 +- .../generated/TaskRunsCreateSamples.java | 2 +- .../generated/TaskRunsDeleteSamples.java | 2 +- .../generated/TaskRunsGetDetailsSamples.java | 2 +- .../generated/TaskRunsGetSamples.java | 2 +- .../generated/TaskRunsListSamples.java | 2 +- .../generated/TaskRunsUpdateSamples.java | 2 +- .../generated/TasksCreateSamples.java | 10 +- .../generated/TasksDeleteSamples.java | 2 +- .../generated/TasksGetDetailsSamples.java | 2 +- .../generated/TasksGetSamples.java | 2 +- .../generated/TasksListSamples.java | 2 +- .../generated/TasksUpdateSamples.java | 10 +- .../generated/TokensCreateSamples.java | 2 +- .../generated/TokensDeleteSamples.java | 2 +- .../generated/TokensGetSamples.java | 2 +- .../generated/TokensListSamples.java | 2 +- .../generated/TokensUpdateSamples.java | 2 +- .../generated/WebhooksCreateSamples.java | 2 +- .../generated/WebhooksDeleteSamples.java | 2 +- .../WebhooksGetCallbackConfigSamples.java | 2 +- .../generated/WebhooksGetSamples.java | 2 +- .../generated/WebhooksListEventsSamples.java | 2 +- .../generated/WebhooksListSamples.java | 2 +- .../generated/WebhooksPingSamples.java | 2 +- .../generated/WebhooksUpdateSamples.java | 2 +- 111 files changed, 5854 insertions(+), 228 deletions(-) create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRulesListResult.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealthStatus.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialName.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetListResult.java create mode 100644 sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetUpdateParameters.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 2ae45fed35cee..1f8c63e82a624 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -59,7 +59,7 @@ "dir": "azure-resourcemanager-containerregistry", "source": "specification/containerregistry/resource-manager/readme.md", "package": "com.azure.resourcemanager.containerregistry", - "args": "--tag=package-2022-12" + "args": "--tag=package-2023-07" }, "containerregistry-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-containerregistry", diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md index c9b851575e37d..abe5117778526 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -2,13 +2,11 @@ ## 2.31.0-beta.1 (Unreleased) -### Features Added - -### Breaking Changes +### Other Changes -### Bugs Fixed +#### Dependency Updates -### Other Changes +- Updated `api-version` to `2023-07-01`. ## 2.30.0 (2023-08-25) diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/assets.json b/sdk/resourcemanager/azure-resourcemanager-containerregistry/assets.json index d0c9d85afdf0c..9f5cf02e29233 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/assets.json +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/resourcemanager/azure-resourcemanager-containerregistry", - "Tag": "java/resourcemanager/azure-resourcemanager-containerregistry_bfd3d979bd" + "Tag": "java/resourcemanager/azure-resourcemanager-containerregistry_1a4bd3c103" } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml index 5acd4f9e97ede..75baf4dc3266d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/pom.xml @@ -43,6 +43,7 @@ false + true diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java new file mode 100644 index 0000000000000..b0e0d180d4168 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CacheRulesClient.java @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.models.CacheRuleInner; +import com.azure.resourcemanager.containerregistry.models.CacheRuleUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CacheRulesClient. */ +public interface CacheRulesClient { + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String cacheRuleName, Context context); + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner get(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, CacheRuleInner> beginCreateAsync( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginCreate( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginCreate( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, + Context context); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner create( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters); + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner create( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, + Context context); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String cacheRuleName, Context context); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String cacheRuleName); + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String cacheRuleName, Context context); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, CacheRuleInner> beginUpdateAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginUpdate( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheRuleInner> beginUpdate( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner update( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters); + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheRuleInner update( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java index 0f4620804d3b3..e89f0fc348da6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ContainerRegistryManagementClient.java @@ -37,6 +37,20 @@ public interface ContainerRegistryManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the CacheRulesClient object to access its operations. + * + * @return the CacheRulesClient object. + */ + CacheRulesClient getCacheRules(); + + /** + * Gets the CredentialSetsClient object to access its operations. + * + * @return the CredentialSetsClient object. + */ + CredentialSetsClient getCredentialSets(); + /** * Gets the RegistriesClient object to access its operations. * diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java new file mode 100644 index 0000000000000..d4bb168072198 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/CredentialSetsClient.java @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.models.CredentialSetInner; +import com.azure.resourcemanager.containerregistry.models.CredentialSetUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CredentialSetsClient. */ +public interface CredentialSetsClient { + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String registryName); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, Context context); + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String credentialSetName); + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String registryName, String credentialSetName); + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String credentialSetName, Context context); + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner get(String resourceGroupName, String registryName, String credentialSetName); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createWithResponseAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, CredentialSetInner> beginCreateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginCreate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginCreate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters, + Context context); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner create( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters); + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner create( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters, + Context context); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String credentialSetName, Context context); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String credentialSetName); + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String credentialSetName, Context context); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, CredentialSetInner> beginUpdateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginUpdate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CredentialSetInner> beginUpdate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner update( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters); + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CredentialSetInner update( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context); +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java new file mode 100644 index 0000000000000..ed7567cba4867 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleInner.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** An object that represents a cache rule for a container registry. */ +@Fluent +public final class CacheRuleInner extends ProxyResource { + /* + * The properties of the cache rule. + */ + @JsonProperty(value = "properties") + private CacheRuleProperties innerProperties; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of CacheRuleInner class. */ + public CacheRuleInner() { + } + + /** + * Get the innerProperties property: The properties of the cache rule. + * + * @return the innerProperties value. + */ + private CacheRuleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the cache rule. + * + * @return the credentialSetResourceId value. + */ + public String credentialSetResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().credentialSetResourceId(); + } + + /** + * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the cache rule. + * + * @param credentialSetResourceId the credentialSetResourceId value to set. + * @return the CacheRuleInner object itself. + */ + public CacheRuleInner withCredentialSetResourceId(String credentialSetResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new CacheRuleProperties(); + } + this.innerProperties().withCredentialSetResourceId(credentialSetResourceId); + return this; + } + + /** + * Get the sourceRepository property: Source repository pulled from upstream. + * + * @return the sourceRepository value. + */ + public String sourceRepository() { + return this.innerProperties() == null ? null : this.innerProperties().sourceRepository(); + } + + /** + * Set the sourceRepository property: Source repository pulled from upstream. + * + * @param sourceRepository the sourceRepository value to set. + * @return the CacheRuleInner object itself. + */ + public CacheRuleInner withSourceRepository(String sourceRepository) { + if (this.innerProperties() == null) { + this.innerProperties = new CacheRuleProperties(); + } + this.innerProperties().withSourceRepository(sourceRepository); + return this; + } + + /** + * Get the targetRepository property: Target repository specified in docker pull command. Eg: docker pull + * myregistry.azurecr.io/{targetRepository}:{tag}. + * + * @return the targetRepository value. + */ + public String targetRepository() { + return this.innerProperties() == null ? null : this.innerProperties().targetRepository(); + } + + /** + * Set the targetRepository property: Target repository specified in docker pull command. Eg: docker pull + * myregistry.azurecr.io/{targetRepository}:{tag}. + * + * @param targetRepository the targetRepository value to set. + * @return the CacheRuleInner object itself. + */ + public CacheRuleInner withTargetRepository(String targetRepository) { + if (this.innerProperties() == null) { + this.innerProperties = new CacheRuleProperties(); + } + this.innerProperties().withTargetRepository(targetRepository); + return this; + } + + /** + * Get the creationDate property: The creation date of the cache rule. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java new file mode 100644 index 0000000000000..f833edf8400be --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleProperties.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties of a cache rule. */ +@Fluent +public final class CacheRuleProperties { + /* + * The ARM resource ID of the credential store which is associated with the cache rule. + */ + @JsonProperty(value = "credentialSetResourceId") + private String credentialSetResourceId; + + /* + * Source repository pulled from upstream. + */ + @JsonProperty(value = "sourceRepository") + private String sourceRepository; + + /* + * Target repository specified in docker pull command. + * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag} + */ + @JsonProperty(value = "targetRepository") + private String targetRepository; + + /* + * The creation date of the cache rule. + */ + @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of CacheRuleProperties class. */ + public CacheRuleProperties() { + } + + /** + * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the cache rule. + * + * @return the credentialSetResourceId value. + */ + public String credentialSetResourceId() { + return this.credentialSetResourceId; + } + + /** + * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the cache rule. + * + * @param credentialSetResourceId the credentialSetResourceId value to set. + * @return the CacheRuleProperties object itself. + */ + public CacheRuleProperties withCredentialSetResourceId(String credentialSetResourceId) { + this.credentialSetResourceId = credentialSetResourceId; + return this; + } + + /** + * Get the sourceRepository property: Source repository pulled from upstream. + * + * @return the sourceRepository value. + */ + public String sourceRepository() { + return this.sourceRepository; + } + + /** + * Set the sourceRepository property: Source repository pulled from upstream. + * + * @param sourceRepository the sourceRepository value to set. + * @return the CacheRuleProperties object itself. + */ + public CacheRuleProperties withSourceRepository(String sourceRepository) { + this.sourceRepository = sourceRepository; + return this; + } + + /** + * Get the targetRepository property: Target repository specified in docker pull command. Eg: docker pull + * myregistry.azurecr.io/{targetRepository}:{tag}. + * + * @return the targetRepository value. + */ + public String targetRepository() { + return this.targetRepository; + } + + /** + * Set the targetRepository property: Target repository specified in docker pull command. Eg: docker pull + * myregistry.azurecr.io/{targetRepository}:{tag}. + * + * @param targetRepository the targetRepository value to set. + * @return the CacheRuleProperties object itself. + */ + public CacheRuleProperties withTargetRepository(String targetRepository) { + this.targetRepository = targetRepository; + return this; + } + + /** + * Get the creationDate property: The creation date of the cache rule. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java new file mode 100644 index 0000000000000..b21e9e0fccd68 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CacheRuleUpdateProperties.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The parameters for updating cache rule properties. */ +@Fluent +public final class CacheRuleUpdateProperties { + /* + * The ARM resource ID of the credential store which is associated with the Cache rule. + */ + @JsonProperty(value = "credentialSetResourceId") + private String credentialSetResourceId; + + /** Creates an instance of CacheRuleUpdateProperties class. */ + public CacheRuleUpdateProperties() { + } + + /** + * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @return the credentialSetResourceId value. + */ + public String credentialSetResourceId() { + return this.credentialSetResourceId; + } + + /** + * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @param credentialSetResourceId the credentialSetResourceId value to set. + * @return the CacheRuleUpdateProperties object itself. + */ + public CacheRuleUpdateProperties withCredentialSetResourceId(String credentialSetResourceId) { + this.credentialSetResourceId = credentialSetResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java new file mode 100644 index 0000000000000..5581cae892163 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetInner.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.containerregistry.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** An object that represents a credential set resource for a container registry. */ +@Fluent +public final class CredentialSetInner extends ProxyResource { + /* + * Identities associated with the resource. This is used to access the KeyVault secrets. + */ + @JsonProperty(value = "identity") + private IdentityProperties identity; + + /* + * The properties of the credential set. + */ + @JsonProperty(value = "properties") + private CredentialSetProperties innerProperties; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of CredentialSetInner class. */ + public CredentialSetInner() { + } + + /** + * Get the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @param identity the identity value to set. + * @return the CredentialSetInner object itself. + */ + public CredentialSetInner withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * Get the innerProperties property: The properties of the credential set. + * + * @return the innerProperties value. + */ + private CredentialSetProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the loginServer property: The credentials are stored for this upstream or login server. + * + * @return the loginServer value. + */ + public String loginServer() { + return this.innerProperties() == null ? null : this.innerProperties().loginServer(); + } + + /** + * Set the loginServer property: The credentials are stored for this upstream or login server. + * + * @param loginServer the loginServer value to set. + * @return the CredentialSetInner object itself. + */ + public CredentialSetInner withLoginServer(String loginServer) { + if (this.innerProperties() == null) { + this.innerProperties = new CredentialSetProperties(); + } + this.innerProperties().withLoginServer(loginServer); + return this; + } + + /** + * Get the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @return the authCredentials value. + */ + public List authCredentials() { + return this.innerProperties() == null ? null : this.innerProperties().authCredentials(); + } + + /** + * Set the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @param authCredentials the authCredentials value to set. + * @return the CredentialSetInner object itself. + */ + public CredentialSetInner withAuthCredentials(List authCredentials) { + if (this.innerProperties() == null) { + this.innerProperties = new CredentialSetProperties(); + } + this.innerProperties().withAuthCredentials(authCredentials); + return this; + } + + /** + * Get the creationDate property: The creation date of credential store resource. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java new file mode 100644 index 0000000000000..bfe9fbbde3f35 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerregistry.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The properties of a credential set resource. */ +@Fluent +public final class CredentialSetProperties { + /* + * The credentials are stored for this upstream or login server. + */ + @JsonProperty(value = "loginServer") + private String loginServer; + + /* + * List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + */ + @JsonProperty(value = "authCredentials") + private List authCredentials; + + /* + * The creation date of credential store resource. + */ + @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of CredentialSetProperties class. */ + public CredentialSetProperties() { + } + + /** + * Get the loginServer property: The credentials are stored for this upstream or login server. + * + * @return the loginServer value. + */ + public String loginServer() { + return this.loginServer; + } + + /** + * Set the loginServer property: The credentials are stored for this upstream or login server. + * + * @param loginServer the loginServer value to set. + * @return the CredentialSetProperties object itself. + */ + public CredentialSetProperties withLoginServer(String loginServer) { + this.loginServer = loginServer; + return this; + } + + /** + * Get the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @return the authCredentials value. + */ + public List authCredentials() { + return this.authCredentials; + } + + /** + * Set the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @param authCredentials the authCredentials value to set. + * @return the CredentialSetProperties object itself. + */ + public CredentialSetProperties withAuthCredentials(List authCredentials) { + this.authCredentials = authCredentials; + return this; + } + + /** + * Get the creationDate property: The creation date of credential store resource. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (authCredentials() != null) { + authCredentials().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java new file mode 100644 index 0000000000000..20da5c8bef057 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/CredentialSetUpdateProperties.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerregistry.models.AuthCredential; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The parameters for updating credential set properties. */ +@Fluent +public final class CredentialSetUpdateProperties { + /* + * List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + */ + @JsonProperty(value = "authCredentials") + private List authCredentials; + + /** Creates an instance of CredentialSetUpdateProperties class. */ + public CredentialSetUpdateProperties() { + } + + /** + * Get the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @return the authCredentials value. + */ + public List authCredentials() { + return this.authCredentials; + } + + /** + * Set the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @param authCredentials the authCredentials value to set. + * @return the CredentialSetUpdateProperties object itself. + */ + public CredentialSetUpdateProperties withAuthCredentials(List authCredentials) { + this.authCredentials = authCredentials; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (authCredentials() != null) { + authCredentials().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java index 5de0f753c79b7..2ab26915e020f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/WebhookPropertiesCreateParameters.java @@ -19,7 +19,7 @@ public final class WebhookPropertiesCreateParameters { /* * The service URI for the webhook to post notifications. */ - @JsonProperty(value = "serviceUri", required = true) + @JsonProperty(value = "serviceUri") private String serviceUri; /* diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java new file mode 100644 index 0000000000000..983c78c87b0d8 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java @@ -0,0 +1,1480 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.CacheRulesClient; +import com.azure.resourcemanager.containerregistry.fluent.models.CacheRuleInner; +import com.azure.resourcemanager.containerregistry.models.CacheRuleUpdateParameters; +import com.azure.resourcemanager.containerregistry.models.CacheRulesListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CacheRulesClient. */ +public final class CacheRulesClientImpl implements CacheRulesClient { + /** The proxy service used to perform REST calls. */ + private final CacheRulesService service; + + /** The service client containing this operation class. */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of CacheRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CacheRulesClientImpl(ContainerRegistryManagementClientImpl client) { + this.service = + RestProxy.create(CacheRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientCacheRules to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerRegistryMan") + public interface CacheRulesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, + @BodyParam("application/json") CacheRuleInner cacheRuleCreateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("cacheRuleName") String cacheRuleName, + @BodyParam("application/json") CacheRuleUpdateParameters cacheRuleUpdateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all cache rule resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + accept, + context); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String registryName, String cacheRuleName) { + return getWithResponseAsync(resourceGroupName, registryName, cacheRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String cacheRuleName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, cacheRuleName, context).block(); + } + + /** + * Gets the properties of the specified cache rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified cache rule resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner get(String resourceGroupName, String registryName, String cacheRuleName) { + return getWithResponse(resourceGroupName, registryName, cacheRuleName, Context.NONE).getValue(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + if (cacheRuleCreateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter cacheRuleCreateParameters is required and cannot be null.")); + } else { + cacheRuleCreateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleCreateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + if (cacheRuleCreateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter cacheRuleCreateParameters is required and cannot be null.")); + } else { + cacheRuleCreateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleCreateParameters, + accept, + context); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, CacheRuleInner> beginCreateAsync( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + Mono>> mono = + createWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CacheRuleInner.class, + CacheRuleInner.class, + this.client.getContext()); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheRuleInner> beginCreateAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CacheRuleInner.class, CacheRuleInner.class, context); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginCreate( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + return this + .beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginCreate( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, + Context context) { + return this + .beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context) + .getSyncPoller(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, + Context context) { + return beginCreateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner create( + String resourceGroupName, String registryName, String cacheRuleName, CacheRuleInner cacheRuleCreateParameters) { + return createAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters).block(); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner create( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleInner cacheRuleCreateParameters, + Context context) { + return createAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, context).block(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String cacheRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + accept, + context); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String cacheRuleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, cacheRuleName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String cacheRuleName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, cacheRuleName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String cacheRuleName) { + return this.beginDeleteAsync(resourceGroupName, registryName, cacheRuleName).getSyncPoller(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String cacheRuleName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, cacheRuleName, context).getSyncPoller(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String registryName, String cacheRuleName) { + return beginDeleteAsync(resourceGroupName, registryName, cacheRuleName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String cacheRuleName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, cacheRuleName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String cacheRuleName) { + deleteAsync(resourceGroupName, registryName, cacheRuleName).block(); + } + + /** + * Deletes a cache rule resource from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String cacheRuleName, Context context) { + deleteAsync(resourceGroupName, registryName, cacheRuleName, context).block(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + if (cacheRuleUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter cacheRuleUpdateParameters is required and cannot be null.")); + } else { + cacheRuleUpdateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleUpdateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (cacheRuleName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); + } + if (cacheRuleUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter cacheRuleUpdateParameters is required and cannot be null.")); + } else { + cacheRuleUpdateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleUpdateParameters, + accept, + context); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, CacheRuleInner> beginUpdateAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CacheRuleInner.class, + CacheRuleInner.class, + this.client.getContext()); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheRuleInner> beginUpdateAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CacheRuleInner.class, CacheRuleInner.class, context); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginUpdate( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters) { + return this + .beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheRuleInner> beginUpdate( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context) { + return beginUpdateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner update( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters) { + return updateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters).block(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a cache rule for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheRuleInner update( + String resourceGroupName, + String registryName, + String cacheRuleName, + CacheRuleUpdateParameters cacheRuleUpdateParameters, + Context context) { + return updateAsync(resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list cache rules for a container registry along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java index fd75280d4b087..ede99cda6e960 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java @@ -9,7 +9,9 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.containerregistry.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerregistry.fluent.CacheRulesClient; import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryManagementClient; +import com.azure.resourcemanager.containerregistry.fluent.CredentialSetsClient; import com.azure.resourcemanager.containerregistry.fluent.OperationsClient; import com.azure.resourcemanager.containerregistry.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerregistry.fluent.RegistriesClient; @@ -87,6 +89,30 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The CacheRulesClient object to access its operations. */ + private final CacheRulesClient cacheRules; + + /** + * Gets the CacheRulesClient object to access its operations. + * + * @return the CacheRulesClient object. + */ + public CacheRulesClient getCacheRules() { + return this.cacheRules; + } + + /** The CredentialSetsClient object to access its operations. */ + private final CredentialSetsClient credentialSets; + + /** + * Gets the CredentialSetsClient object to access its operations. + * + * @return the CredentialSetsClient object. + */ + public CredentialSetsClient getCredentialSets() { + return this.credentialSets; + } + /** The RegistriesClient object to access its operations. */ private final RegistriesClient registries; @@ -242,6 +268,8 @@ public TasksClient getTasks() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.cacheRules = new CacheRulesClientImpl(this); + this.credentialSets = new CredentialSetsClientImpl(this); this.registries = new RegistriesClientImpl(this); this.operations = new OperationsClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java new file mode 100644 index 0000000000000..9f5a8de13569a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java @@ -0,0 +1,1524 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerregistry.fluent.CredentialSetsClient; +import com.azure.resourcemanager.containerregistry.fluent.models.CredentialSetInner; +import com.azure.resourcemanager.containerregistry.models.CredentialSetListResult; +import com.azure.resourcemanager.containerregistry.models.CredentialSetUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CredentialSetsClient. */ +public final class CredentialSetsClientImpl implements CredentialSetsClient { + /** The proxy service used to perform REST calls. */ + private final CredentialSetsService service; + + /** The service client containing this operation class. */ + private final ContainerRegistryManagementClientImpl client; + + /** + * Initializes an instance of CredentialSetsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CredentialSetsClientImpl(ContainerRegistryManagementClientImpl client) { + this.service = + RestProxy.create(CredentialSetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryManagementClientCredentialSets to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerRegistryMan") + public interface CredentialSetsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, + @BodyParam("application/json") CredentialSetInner credentialSetCreateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("credentialSetName") String credentialSetName, + @BodyParam("application/json") CredentialSetUpdateParameters credentialSetUpdateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String registryName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName)); + } + + /** + * Lists all credential set resources for the specified container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, context)); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String credentialSetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String credentialSetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + accept, + context); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String registryName, String credentialSetName) { + return getWithResponseAsync(resourceGroupName, registryName, credentialSetName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String credentialSetName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, credentialSetName, context).block(); + } + + /** + * Gets the properties of the specified credential set resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of the specified credential set resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner get(String resourceGroupName, String registryName, String credentialSetName) { + return getWithResponse(resourceGroupName, registryName, credentialSetName, Context.NONE).getValue(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createWithResponseAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + if (credentialSetCreateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter credentialSetCreateParameters is required and cannot be null.")); + } else { + credentialSetCreateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + credentialSetCreateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + if (credentialSetCreateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter credentialSetCreateParameters is required and cannot be null.")); + } else { + credentialSetCreateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + credentialSetCreateParameters, + accept, + context); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, CredentialSetInner> beginCreateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters) { + Mono>> mono = + createWithResponseAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CredentialSetInner.class, + CredentialSetInner.class, + this.client.getContext()); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CredentialSetInner> beginCreateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync( + resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CredentialSetInner.class, CredentialSetInner.class, context); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginCreate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters) { + return this + .beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters) + .getSyncPoller(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginCreate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters, + Context context) { + return this + .beginCreateAsync( + resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, context) + .getSyncPoller(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters) { + return beginCreateAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters, + Context context) { + return beginCreateAsync( + resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner create( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters) { + return createAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters).block(); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner create( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetInner credentialSetCreateParameters, + Context context) { + return createAsync(resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, context) + .block(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String credentialSetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, String credentialSetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + accept, + context); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String credentialSetName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, credentialSetName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, String credentialSetName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, credentialSetName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String credentialSetName) { + return this.beginDeleteAsync(resourceGroupName, registryName, credentialSetName).getSyncPoller(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, String credentialSetName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, credentialSetName, context).getSyncPoller(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String registryName, String credentialSetName) { + return beginDeleteAsync(resourceGroupName, registryName, credentialSetName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String registryName, String credentialSetName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, credentialSetName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String credentialSetName) { + deleteAsync(resourceGroupName, registryName, credentialSetName).block(); + } + + /** + * Deletes a credential set from a container registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String credentialSetName, Context context) { + deleteAsync(resourceGroupName, registryName, credentialSetName, context).block(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + if (credentialSetUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter credentialSetUpdateParameters is required and cannot be null.")); + } else { + credentialSetUpdateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + credentialSetUpdateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (credentialSetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); + } + if (credentialSetUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter credentialSetUpdateParameters is required and cannot be null.")); + } else { + credentialSetUpdateParameters.validate(); + } + final String apiVersion = "2023-07-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + apiVersion, + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + credentialSetName, + credentialSetUpdateParameters, + accept, + context); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, CredentialSetInner> beginUpdateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CredentialSetInner.class, + CredentialSetInner.class, + this.client.getContext()); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CredentialSetInner> beginUpdateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CredentialSetInner.class, CredentialSetInner.class, context); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginUpdate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters) { + return this + .beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an object that represents a credential set resource for a container + * registry. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CredentialSetInner> beginUpdate( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context) { + return this + .beginUpdateAsync( + resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters) { + return beginUpdateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context) { + return beginUpdateAsync( + resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner update( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters) { + return updateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters).block(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an object that represents a credential set resource for a container registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CredentialSetInner update( + String resourceGroupName, + String registryName, + String credentialSetName, + CredentialSetUpdateParameters credentialSetUpdateParameters, + Context context) { + return updateAsync(resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list credential sets for a container registry along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java index 969318547e1f9..34642aeb64e1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java @@ -93,7 +93,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) @@ -127,7 +127,7 @@ private Mono> listSinglePageAsync(Contex new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java index bd339d6df0f44..5a4a75eb4f2d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java @@ -169,7 +169,7 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -229,7 +229,7 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -363,7 +363,7 @@ public Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -422,7 +422,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -544,7 +544,7 @@ public Mono>> createOrUpdateWithResponseAsync( } else { privateEndpointConnection.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -617,7 +617,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { privateEndpointConnection.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -893,7 +893,7 @@ public Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; return FluxUtil .withContext( context -> @@ -949,7 +949,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; context = this.client.mergeContext(context); return service .delete( diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java index 553daba85c411..57fc4b934921f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java @@ -379,7 +379,7 @@ public Mono>> importImageWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; return FluxUtil .withContext( context -> @@ -434,7 +434,7 @@ private Mono>> importImageWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; context = this.client.mergeContext(context); return service .importImage( @@ -631,7 +631,7 @@ public Mono> checkNameAvailabilityWithResponse } else { registryNameCheckRequest.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -681,7 +681,7 @@ private Mono> checkNameAvailabilityWithRespons } else { registryNameCheckRequest.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -766,7 +766,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -809,7 +809,7 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -906,7 +906,7 @@ private Mono> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -961,7 +961,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1078,7 +1078,7 @@ public Mono> getByResourceGroupWithResponseAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1129,7 +1129,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1230,7 +1230,7 @@ public Mono>> createWithResponseAsync( } else { registry.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1288,7 +1288,7 @@ private Mono>> createWithResponseAsync( } else { registry.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1490,7 +1490,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; return FluxUtil .withContext( context -> @@ -1538,7 +1538,7 @@ private Mono>> deleteWithResponseAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; context = this.client.mergeContext(context); return service .delete( @@ -1725,7 +1725,7 @@ public Mono>> updateWithResponseAsync( } else { registryUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1788,7 +1788,7 @@ private Mono>> updateWithResponseAsync( } else { registryUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2009,7 +2009,7 @@ public Mono> listUsagesWithResponseAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2060,7 +2060,7 @@ private Mono> listUsagesWithResponseAsync if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2155,7 +2155,7 @@ private Mono> listPrivateLinkResourcesSi if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2215,7 +2215,7 @@ private Mono> listPrivateLinkResourcesSi if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2349,7 +2349,7 @@ public Mono> getPrivateLinkResourceWithRespon if (groupName == null) { return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2405,7 +2405,7 @@ private Mono> getPrivateLinkResourceWithRespo if (groupName == null) { return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2507,7 +2507,7 @@ public Mono> listCredentialsWithRes if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2558,7 +2558,7 @@ private Mono> listCredentialsWithRe if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2664,7 +2664,7 @@ public Mono> regenerateCredentialWi } else { regenerateCredentialParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2729,7 +2729,7 @@ private Mono> regenerateCredentialW } else { regenerateCredentialParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2849,7 +2849,7 @@ public Mono>> generateCredentialsWithResponseAsync( } else { generateCredentialsParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2913,7 +2913,7 @@ private Mono>> generateCredentialsWithResponseAsync( } else { generateCredentialsParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java index dcc7fe5d5ec4d..74df17e8b09d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java @@ -184,7 +184,7 @@ private Mono> listSinglePageAsync(String resourc if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -244,7 +244,7 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -374,7 +374,7 @@ public Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -431,7 +431,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -541,7 +541,7 @@ public Mono>> createWithResponseAsync( } else { replication.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -609,7 +609,7 @@ private Mono>> createWithResponseAsync( } else { replication.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -849,7 +849,7 @@ public Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; return FluxUtil .withContext( context -> @@ -903,7 +903,7 @@ private Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; context = this.client.mergeContext(context); return service .delete( @@ -1115,7 +1115,7 @@ public Mono>> updateWithResponseAsync( } else { replicationUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1186,7 +1186,7 @@ private Mono>> updateWithResponseAsync( } else { replicationUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java index 29f8b4baa12df..3e49103006b7e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java @@ -185,7 +185,7 @@ private Mono> listSinglePageAsync(String resourceGr if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -245,7 +245,7 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -374,7 +374,7 @@ public Mono> getWithResponseAsync( if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -430,7 +430,7 @@ private Mono> getWithResponseAsync( if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -541,7 +541,7 @@ public Mono>> createWithResponseAsync( } else { scopeMapCreateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -610,7 +610,7 @@ private Mono>> createWithResponseAsync( } else { scopeMapCreateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -849,7 +849,7 @@ public Mono>> deleteWithResponseAsync( if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -904,7 +904,7 @@ private Mono>> deleteWithResponseAsync( if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1115,7 +1115,7 @@ public Mono>> updateWithResponseAsync( } else { scopeMapUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1184,7 +1184,7 @@ private Mono>> updateWithResponseAsync( } else { scopeMapUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java index 202abcfe8d42f..fe3e3c50a8ade 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java @@ -184,7 +184,7 @@ private Mono> listSinglePageAsync(String resourceGroup if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -244,7 +244,7 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -373,7 +373,7 @@ public Mono> getWithResponseAsync( if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -429,7 +429,7 @@ private Mono> getWithResponseAsync( if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -539,7 +539,7 @@ public Mono>> createWithResponseAsync( } else { tokenCreateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -607,7 +607,7 @@ private Mono>> createWithResponseAsync( } else { tokenCreateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -840,7 +840,7 @@ public Mono>> deleteWithResponseAsync( if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -895,7 +895,7 @@ private Mono>> deleteWithResponseAsync( if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1101,7 +1101,7 @@ public Mono>> updateWithResponseAsync( } else { tokenUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1169,7 +1169,7 @@ private Mono>> updateWithResponseAsync( } else { tokenUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java index bf612aa5fc234..d911336a147f5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java @@ -244,7 +244,7 @@ private Mono> listSinglePageAsync(String resourceGro if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -304,7 +304,7 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -433,7 +433,7 @@ public Mono> getWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -489,7 +489,7 @@ private Mono> getWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -603,7 +603,7 @@ public Mono>> createWithResponseAsync( } else { webhookCreateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -672,7 +672,7 @@ private Mono>> createWithResponseAsync( } else { webhookCreateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -919,7 +919,7 @@ public Mono>> deleteWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; return FluxUtil .withContext( context -> @@ -972,7 +972,7 @@ private Mono>> deleteWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; context = this.client.mergeContext(context); return service .delete( @@ -1180,7 +1180,7 @@ public Mono>> updateWithResponseAsync( } else { webhookUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1249,7 +1249,7 @@ private Mono>> updateWithResponseAsync( } else { webhookUpdateParameters.validate(); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1496,7 +1496,7 @@ public Mono> pingWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1551,7 +1551,7 @@ private Mono> pingWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1654,7 +1654,7 @@ private Mono> listEventsSinglePageAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1719,7 +1719,7 @@ private Mono> listEventsSinglePageAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1852,7 +1852,7 @@ public Mono> getCallbackConfigWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1908,7 +1908,7 @@ private Mono> getCallbackConfigWithResponseAsync( if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2022-12-01"; + final String apiVersion = "2023-07-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java new file mode 100644 index 0000000000000..8d09b022e7c21 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthCredential.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Authentication credential stored for an upstream. */ +@Fluent +public final class AuthCredential { + /* + * The name of the credential. + */ + @JsonProperty(value = "name") + private CredentialName name; + + /* + * KeyVault Secret URI for accessing the username. + */ + @JsonProperty(value = "usernameSecretIdentifier") + private String usernameSecretIdentifier; + + /* + * KeyVault Secret URI for accessing the password. + */ + @JsonProperty(value = "passwordSecretIdentifier") + private String passwordSecretIdentifier; + + /* + * This provides data pertaining to the health of the auth credential. + */ + @JsonProperty(value = "credentialHealth", access = JsonProperty.Access.WRITE_ONLY) + private CredentialHealth credentialHealth; + + /** Creates an instance of AuthCredential class. */ + public AuthCredential() { + } + + /** + * Get the name property: The name of the credential. + * + * @return the name value. + */ + public CredentialName name() { + return this.name; + } + + /** + * Set the name property: The name of the credential. + * + * @param name the name value to set. + * @return the AuthCredential object itself. + */ + public AuthCredential withName(CredentialName name) { + this.name = name; + return this; + } + + /** + * Get the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username. + * + * @return the usernameSecretIdentifier value. + */ + public String usernameSecretIdentifier() { + return this.usernameSecretIdentifier; + } + + /** + * Set the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username. + * + * @param usernameSecretIdentifier the usernameSecretIdentifier value to set. + * @return the AuthCredential object itself. + */ + public AuthCredential withUsernameSecretIdentifier(String usernameSecretIdentifier) { + this.usernameSecretIdentifier = usernameSecretIdentifier; + return this; + } + + /** + * Get the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password. + * + * @return the passwordSecretIdentifier value. + */ + public String passwordSecretIdentifier() { + return this.passwordSecretIdentifier; + } + + /** + * Set the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password. + * + * @param passwordSecretIdentifier the passwordSecretIdentifier value to set. + * @return the AuthCredential object itself. + */ + public AuthCredential withPasswordSecretIdentifier(String passwordSecretIdentifier) { + this.passwordSecretIdentifier = passwordSecretIdentifier; + return this; + } + + /** + * Get the credentialHealth property: This provides data pertaining to the health of the auth credential. + * + * @return the credentialHealth value. + */ + public CredentialHealth credentialHealth() { + return this.credentialHealth; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (credentialHealth() != null) { + credentialHealth().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java new file mode 100644 index 0000000000000..66f376cc3a745 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRuleUpdateParameters.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerregistry.fluent.models.CacheRuleUpdateProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The parameters for updating a cache rule. */ +@Fluent +public final class CacheRuleUpdateParameters { + /* + * The properties of the cache rule update parameters. + */ + @JsonProperty(value = "properties") + private CacheRuleUpdateProperties innerProperties; + + /** Creates an instance of CacheRuleUpdateParameters class. */ + public CacheRuleUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties of the cache rule update parameters. + * + * @return the innerProperties value. + */ + private CacheRuleUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @return the credentialSetResourceId value. + */ + public String credentialSetResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().credentialSetResourceId(); + } + + /** + * Set the credentialSetResourceId property: The ARM resource ID of the credential store which is associated with + * the Cache rule. + * + * @param credentialSetResourceId the credentialSetResourceId value to set. + * @return the CacheRuleUpdateParameters object itself. + */ + public CacheRuleUpdateParameters withCredentialSetResourceId(String credentialSetResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new CacheRuleUpdateProperties(); + } + this.innerProperties().withCredentialSetResourceId(credentialSetResourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRulesListResult.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRulesListResult.java new file mode 100644 index 0000000000000..8b093fd0fd39e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CacheRulesListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerregistry.fluent.models.CacheRuleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The result of a request to list cache rules for a container registry. */ +@Fluent +public final class CacheRulesListResult { + /* + * The list of cache rules. + */ + @JsonProperty(value = "value") + private List value; + + /* + * If provided, client must use NextLink URI to request next list of cache rules. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of CacheRulesListResult class. */ + public CacheRulesListResult() { + } + + /** + * Get the value property: The list of cache rules. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of cache rules. + * + * @param value the value value to set. + * @return the CacheRulesListResult object itself. + */ + public CacheRulesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: If provided, client must use NextLink URI to request next list of cache rules. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: If provided, client must use NextLink URI to request next list of cache rules. + * + * @param nextLink the nextLink value to set. + * @return the CacheRulesListResult object itself. + */ + public CacheRulesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java new file mode 100644 index 0000000000000..31cd94d24aa2c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealth.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The health of the auth credential. */ +@Fluent +public final class CredentialHealth { + /* + * The health status of credential. + */ + @JsonProperty(value = "status") + private CredentialHealthStatus status; + + /* + * Error code representing the health check error. + */ + @JsonProperty(value = "errorCode") + private String errorCode; + + /* + * Descriptive message representing the health check error. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** Creates an instance of CredentialHealth class. */ + public CredentialHealth() { + } + + /** + * Get the status property: The health status of credential. + * + * @return the status value. + */ + public CredentialHealthStatus status() { + return this.status; + } + + /** + * Set the status property: The health status of credential. + * + * @param status the status value to set. + * @return the CredentialHealth object itself. + */ + public CredentialHealth withStatus(CredentialHealthStatus status) { + this.status = status; + return this; + } + + /** + * Get the errorCode property: Error code representing the health check error. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Set the errorCode property: Error code representing the health check error. + * + * @param errorCode the errorCode value to set. + * @return the CredentialHealth object itself. + */ + public CredentialHealth withErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the errorMessage property: Descriptive message representing the health check error. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set the errorMessage property: Descriptive message representing the health check error. + * + * @param errorMessage the errorMessage value to set. + * @return the CredentialHealth object itself. + */ + public CredentialHealth withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealthStatus.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealthStatus.java new file mode 100644 index 0000000000000..abc572cf34cd4 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialHealthStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The health status of credential. */ +public final class CredentialHealthStatus extends ExpandableStringEnum { + /** Static value Healthy for CredentialHealthStatus. */ + public static final CredentialHealthStatus HEALTHY = fromString("Healthy"); + + /** Static value Unhealthy for CredentialHealthStatus. */ + public static final CredentialHealthStatus UNHEALTHY = fromString("Unhealthy"); + + /** + * Creates a new instance of CredentialHealthStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CredentialHealthStatus() { + } + + /** + * Creates or finds a CredentialHealthStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CredentialHealthStatus. + */ + @JsonCreator + public static CredentialHealthStatus fromString(String name) { + return fromString(name, CredentialHealthStatus.class); + } + + /** + * Gets known CredentialHealthStatus values. + * + * @return known CredentialHealthStatus values. + */ + public static Collection values() { + return values(CredentialHealthStatus.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialName.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialName.java new file mode 100644 index 0000000000000..47e9f3395e79d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialName.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The name of the credential. */ +public final class CredentialName extends ExpandableStringEnum { + /** Static value Credential1 for CredentialName. */ + public static final CredentialName CREDENTIAL1 = fromString("Credential1"); + + /** + * Creates a new instance of CredentialName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CredentialName() { + } + + /** + * Creates or finds a CredentialName from its string representation. + * + * @param name a name to look for. + * @return the corresponding CredentialName. + */ + @JsonCreator + public static CredentialName fromString(String name) { + return fromString(name, CredentialName.class); + } + + /** + * Gets known CredentialName values. + * + * @return known CredentialName values. + */ + public static Collection values() { + return values(CredentialName.class); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetListResult.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetListResult.java new file mode 100644 index 0000000000000..f542c0454a228 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetListResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerregistry.fluent.models.CredentialSetInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The result of a request to list credential sets for a container registry. */ +@Fluent +public final class CredentialSetListResult { + /* + * The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the + * next list of credential sets. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URI that can be used to request the next list of credential sets. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of CredentialSetListResult class. */ + public CredentialSetListResult() { + } + + /** + * Get the value property: The list of credential sets. Since this list may be incomplete, the nextLink field should + * be used to request the next list of credential sets. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of credential sets. Since this list may be incomplete, the nextLink field should + * be used to request the next list of credential sets. + * + * @param value the value value to set. + * @return the CredentialSetListResult object itself. + */ + public CredentialSetListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI that can be used to request the next list of credential sets. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URI that can be used to request the next list of credential sets. + * + * @param nextLink the nextLink value to set. + * @return the CredentialSetListResult object itself. + */ + public CredentialSetListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetUpdateParameters.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetUpdateParameters.java new file mode 100644 index 0000000000000..3f0c2cc876e5c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CredentialSetUpdateParameters.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.containerregistry.fluent.models.CredentialSetUpdateProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The parameters for updating a credential set. */ +@Fluent +public final class CredentialSetUpdateParameters { + /* + * The properties of the credential set update parameters + */ + @JsonProperty(value = "properties") + private CredentialSetUpdateProperties innerProperties; + + /* + * Identities associated with the resource. This is used to access the KeyVault secrets. + */ + @JsonProperty(value = "identity") + private IdentityProperties identity; + + /** Creates an instance of CredentialSetUpdateParameters class. */ + public CredentialSetUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties of the credential set update parameters. + * + * @return the innerProperties value. + */ + private CredentialSetUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: Identities associated with the resource. This is used to access the KeyVault secrets. + * + * @param identity the identity value to set. + * @return the CredentialSetUpdateParameters object itself. + */ + public CredentialSetUpdateParameters withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * Get the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @return the authCredentials value. + */ + public List authCredentials() { + return this.innerProperties() == null ? null : this.innerProperties().authCredentials(); + } + + /** + * Set the authCredentials property: List of authentication credentials stored for an upstream. Usually consists of + * a primary and an optional secondary credential. + * + * @param authCredentials the authCredentials value to set. + * @return the CredentialSetUpdateParameters object itself. + */ + public CredentialSetUpdateParameters withAuthCredentials(List authCredentials) { + if (this.innerProperties() == null) { + this.innerProperties = new CredentialSetUpdateProperties(); + } + this.innerProperties().withAuthCredentials(authCredentials); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java index 9153f2c5e7afd..b8f1264c99d7a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/IdentityProperties.java @@ -15,13 +15,13 @@ public final class IdentityProperties { /* * The principal ID of resource identity. */ - @JsonProperty(value = "principalId") + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* * The tenant ID of resource. */ - @JsonProperty(value = "tenantId") + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* @@ -53,17 +53,6 @@ public String principalId() { return this.principalId; } - /** - * Set the principalId property: The principal ID of resource identity. - * - * @param principalId the principalId value to set. - * @return the IdentityProperties object itself. - */ - public IdentityProperties withPrincipalId(String principalId) { - this.principalId = principalId; - return this; - } - /** * Get the tenantId property: The tenant ID of resource. * @@ -73,17 +62,6 @@ public String tenantId() { return this.tenantId; } - /** - * Set the tenantId property: The tenant ID of resource. - * - * @param tenantId the tenantId value to set. - * @return the IdentityProperties object itself. - */ - public IdentityProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - /** * Get the type property: The identity type. * diff --git a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java index 96dafd7434f7c..37714cb85b08e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UserIdentityProperties.java @@ -4,22 +4,22 @@ package com.azure.resourcemanager.containerregistry.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; /** The UserIdentityProperties model. */ -@Fluent +@Immutable public final class UserIdentityProperties { /* * The principal id of user assigned identity. */ - @JsonProperty(value = "principalId") + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* * The client id of user assigned identity. */ - @JsonProperty(value = "clientId") + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private String clientId; /** Creates an instance of UserIdentityProperties class. */ @@ -35,17 +35,6 @@ public String principalId() { return this.principalId; } - /** - * Set the principalId property: The principal id of user assigned identity. - * - * @param principalId the principalId value to set. - * @return the UserIdentityProperties object itself. - */ - public UserIdentityProperties withPrincipalId(String principalId) { - this.principalId = principalId; - return this; - } - /** * Get the clientId property: The client id of user assigned identity. * @@ -55,17 +44,6 @@ public String clientId() { return this.clientId; } - /** - * Set the clientId property: The client id of user assigned identity. - * - * @param clientId the clientId value to set. - * @return the UserIdentityProperties object itself. - */ - public UserIdentityProperties withClientId(String clientId) { - this.clientId = clientId; - return this; - } - /** * Validates the instance. * diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsCreateSamples.java index c1e7bea7affe2..e53971116131f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for AgentPools Create. */ public final class AgentPoolsCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsCreate.json */ /** * Sample code: AgentPools_Create. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsDeleteSamples.java index a72a2a7e78cd5..838fd192e42bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for AgentPools Delete. */ public final class AgentPoolsDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsDelete.json */ /** * Sample code: AgentPools_Delete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetQueueStatusSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetQueueStatusSamples.java index c4d291f0c17b9..462c7be534a9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetQueueStatusSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetQueueStatusSamples.java @@ -7,7 +7,7 @@ /** Samples for AgentPools GetQueueStatus. */ public final class AgentPoolsGetQueueStatusSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGetQueueStatus.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGetQueueStatus.json */ /** * Sample code: AgentPools_GetQueueStatus. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetSamples.java index 9cfd73451af74..7eda6a6b68c9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for AgentPools Get. */ public final class AgentPoolsGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json */ /** * Sample code: AgentPools_Get. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsListSamples.java index 3c95612b681a8..976401c821aa6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsListSamples.java @@ -7,7 +7,7 @@ /** Samples for AgentPools List. */ public final class AgentPoolsListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsList.json */ /** * Sample code: AgentPools_List. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsUpdateSamples.java index 57de6643aa817..bab0a1fee9aa5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for AgentPools Update. */ public final class AgentPoolsUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsUpdate.json */ /** * Sample code: AgentPools_Update. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java new file mode 100644 index 0000000000000..751651028ff4d --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesCreateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.resourcemanager.containerregistry.fluent.models.CacheRuleInner; + +/** Samples for CacheRules Create. */ +public final class CacheRulesCreateSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CacheRuleCreate.json + */ + /** + * Sample code: CacheRuleCreate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void cacheRuleCreate(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCacheRules() + .create( + "myResourceGroup", + "myRegistry", + "myCacheRule", + new CacheRuleInner() + .withCredentialSetResourceId("fakeTokenPlaceholder") + .withSourceRepository("docker.io/library/hello-world") + .withTargetRepository("cached-docker-hub/hello-world"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java new file mode 100644 index 0000000000000..b441dd4a03fda --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +/** Samples for CacheRules Delete. */ +public final class CacheRulesDeleteSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CacheRuleDelete.json + */ + /** + * Sample code: CacheRuleDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void cacheRuleDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCacheRules() + .delete("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java new file mode 100644 index 0000000000000..52b3a0fb4638e --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +/** Samples for CacheRules Get. */ +public final class CacheRulesGetSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CacheRuleGet.json + */ + /** + * Sample code: CacheRuleGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void cacheRuleGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCacheRules() + .getWithResponse("myResourceGroup", "myRegistry", "myCacheRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java new file mode 100644 index 0000000000000..f5024657f9442 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +/** Samples for CacheRules List. */ +public final class CacheRulesListSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CacheRuleList.json + */ + /** + * Sample code: CacheRuleList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void cacheRuleList(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCacheRules() + .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java new file mode 100644 index 0000000000000..6aa261a8648a5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CacheRulesUpdateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.resourcemanager.containerregistry.models.CacheRuleUpdateParameters; + +/** Samples for CacheRules Update. */ +public final class CacheRulesUpdateSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CacheRuleUpdate.json + */ + /** + * Sample code: CacheRuleUpdate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void cacheRuleUpdate(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCacheRules() + .update( + "myResourceGroup", + "myRegistry", + "myCacheRule", + new CacheRuleUpdateParameters().withCredentialSetResourceId("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java new file mode 100644 index 0000000000000..522b47a3e491c --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsCreateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.resourcemanager.containerregistry.fluent.models.CredentialSetInner; +import com.azure.resourcemanager.containerregistry.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.models.CredentialName; +import com.azure.resourcemanager.containerregistry.models.IdentityProperties; +import com.azure.resourcemanager.containerregistry.models.ResourceIdentityType; +import java.util.Arrays; + +/** Samples for CredentialSets Create. */ +public final class CredentialSetsCreateSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CredentialSetCreate.json + */ + /** + * Sample code: CredentialSetCreate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void credentialSetCreate(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCredentialSets() + .create( + "myResourceGroup", + "myRegistry", + "myCredentialSet", + new CredentialSetInner() + .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withLoginServer("docker.io") + .withAuthCredentials( + Arrays + .asList( + new AuthCredential() + .withName(CredentialName.CREDENTIAL1) + .withUsernameSecretIdentifier("fakeTokenPlaceholder") + .withPasswordSecretIdentifier("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java new file mode 100644 index 0000000000000..3d7942d96d9f7 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +/** Samples for CredentialSets Delete. */ +public final class CredentialSetsDeleteSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CredentialSetDelete.json + */ + /** + * Sample code: CredentialSetDelete. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void credentialSetDelete(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCredentialSets() + .delete("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java new file mode 100644 index 0000000000000..8780cdee1e9f6 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +/** Samples for CredentialSets Get. */ +public final class CredentialSetsGetSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CredentialSetGet.json + */ + /** + * Sample code: CredentialSetGet. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void credentialSetGet(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCredentialSets() + .getWithResponse("myResourceGroup", "myRegistry", "myCredentialSet", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java new file mode 100644 index 0000000000000..d2792ca7a6ea3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +/** Samples for CredentialSets List. */ +public final class CredentialSetsListSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CredentialSetList.json + */ + /** + * Sample code: CredentialSetList. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void credentialSetList(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCredentialSets() + .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java new file mode 100644 index 0000000000000..91ce1fd44a5e5 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/CredentialSetsUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerregistry.generated; + +import com.azure.resourcemanager.containerregistry.models.AuthCredential; +import com.azure.resourcemanager.containerregistry.models.CredentialName; +import com.azure.resourcemanager.containerregistry.models.CredentialSetUpdateParameters; +import java.util.Arrays; + +/** Samples for CredentialSets Update. */ +public final class CredentialSetsUpdateSamples { + /* + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/CredentialSetUpdate.json + */ + /** + * Sample code: CredentialSetUpdate. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void credentialSetUpdate(com.azure.resourcemanager.AzureResourceManager azure) { + azure + .containerRegistries() + .manager() + .serviceClient() + .getCredentialSets() + .update( + "myResourceGroup", + "myRegistry", + "myCredentialSet", + new CredentialSetUpdateParameters() + .withAuthCredentials( + Arrays + .asList( + new AuthCredential() + .withName(CredentialName.CREDENTIAL1) + .withUsernameSecretIdentifier("fakeTokenPlaceholder") + .withPasswordSecretIdentifier("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java index f4a2f1f5df687..f2316fe2c718a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/OperationList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/OperationList.json */ /** * Sample code: OperationList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 7ec111853abdf..09f1fedc5a16b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/PrivateEndpointConnectionCreateOrUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/PrivateEndpointConnectionCreateOrUpdate.json */ /** * Sample code: PrivateEndpointConnectionCreateOrUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java index f8b595ca8b016..cee69115f8252 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/PrivateEndpointConnectionDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/PrivateEndpointConnectionDelete.json */ /** * Sample code: PrivateEndpointConnectionDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java index c2ba09b743e81..388ca3a36bd5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/PrivateEndpointConnectionGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/PrivateEndpointConnectionGet.json */ /** * Sample code: PrivateEndpointConnectionGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java index 1f2d5693c1e49..e083a47ae4c20 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/PrivateEndpointConnectionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/PrivateEndpointConnectionList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/PrivateEndpointConnectionList.json */ /** * Sample code: PrivateEndpointConnectionList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java index 1edad8ac5eb23..c7e5fdae712de 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for Registries CheckNameAvailability. */ public final class RegistriesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryCheckNameAvailable.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryCheckNameAvailable.json */ /** * Sample code: RegistryCheckNameAvailable. @@ -27,7 +27,7 @@ public static void registryCheckNameAvailable(com.azure.resourcemanager.AzureRes } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryCheckNameNotAvailable.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryCheckNameNotAvailable.json */ /** * Sample code: RegistryCheckNameNotAvailable. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java index ba145bddec750..241f68e1c14e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesCreateSamples.java @@ -14,7 +14,7 @@ /** Samples for Registries Create. */ public final class RegistriesCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryCreateZoneRedundant.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryCreateZoneRedundant.json */ /** * Sample code: RegistryCreateZoneRedundant. @@ -39,7 +39,7 @@ public static void registryCreateZoneRedundant(com.azure.resourcemanager.AzureRe } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryCreate.json */ /** * Sample code: RegistryCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java index 783a2ea2a192e..8c3ac1f00448e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries Delete. */ public final class RegistriesDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryDelete.json */ /** * Sample code: RegistryDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java index 18e0191316052..a58cb7aef0cbe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGenerateCredentialsSamples.java @@ -10,7 +10,7 @@ /** Samples for Registries GenerateCredentials. */ public final class RegistriesGenerateCredentialsSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryGenerateCredentials.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryGenerateCredentials.json */ /** * Sample code: RegistryGenerateCredentials. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetBuildSourceUploadUrlSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetBuildSourceUploadUrlSamples.java index 6c89b10353ae0..a8041daed1f9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetBuildSourceUploadUrlSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetBuildSourceUploadUrlSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries GetBuildSourceUploadUrl. */ public final class RegistriesGetBuildSourceUploadUrlSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json */ /** * Sample code: Registries_GetBuildSourceUploadUrl. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java index e1404c8ec5f51..40dc4a3675c49 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries GetByResourceGroup. */ public final class RegistriesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryGet.json */ /** * Sample code: RegistryGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java index 8a1cc8fe5c692..8b95e4c56dd4a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetPrivateLinkResourceSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries GetPrivateLinkResource. */ public final class RegistriesGetPrivateLinkResourceSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryGetPrivateLinkResource.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryGetPrivateLinkResource.json */ /** * Sample code: RegistryGetPrivateLinkResource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java index 778bac33bd5ee..eadbffab3bb97 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesImportImageSamples.java @@ -12,7 +12,7 @@ /** Samples for Registries ImportImage. */ public final class RegistriesImportImageSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ImportImageFromPublicRegistry.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ImportImageFromPublicRegistry.json */ /** * Sample code: ImportImageFromPublicRegistry. @@ -40,7 +40,7 @@ public static void importImageFromPublicRegistry(com.azure.resourcemanager.Azure } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ImportImageByTag.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ImportImageByTag.json */ /** * Sample code: ImportImageByTag. @@ -69,7 +69,7 @@ public static void importImageByTag(com.azure.resourcemanager.AzureResourceManag } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ImportImageByManifestDigest.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ImportImageByManifestDigest.json */ /** * Sample code: ImportImageByManifestDigest. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java index f81fa94ef3b3e..9c1ef3b6c5636 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries ListByResourceGroup. */ public final class RegistriesListByResourceGroupSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryListByResourceGroup.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryListByResourceGroup.json */ /** * Sample code: RegistryListByResourceGroup. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java index fce3c40965cc6..1e12368efdc36 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListCredentialsSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries ListCredentials. */ public final class RegistriesListCredentialsSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryListCredentials.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryListCredentials.json */ /** * Sample code: RegistryListCredentials. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java index f9f8610b50604..a76412454ea03 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListPrivateLinkResourcesSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries ListPrivateLinkResources. */ public final class RegistriesListPrivateLinkResourcesSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryListPrivateLinkResources.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryListPrivateLinkResources.json */ /** * Sample code: RegistryListPrivateLinkResources. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java index f232e0f6e9eb1..cd00d00d44e57 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries List. */ public final class RegistriesListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryList.json */ /** * Sample code: RegistryList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java index 8525fb31cd8ac..ca90b42476a05 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesListUsagesSamples.java @@ -7,7 +7,7 @@ /** Samples for Registries ListUsages. */ public final class RegistriesListUsagesSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryListUsages.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryListUsages.json */ /** * Sample code: RegistryListUsages. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java index 16d1b139ea2b0..ec31e05b20cbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesRegenerateCredentialSamples.java @@ -10,7 +10,7 @@ /** Samples for Registries RegenerateCredential. */ public final class RegistriesRegenerateCredentialSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryRegenerateCredential.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryRegenerateCredential.json */ /** * Sample code: RegistryRegenerateCredential. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesScheduleRunSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesScheduleRunSamples.java index 6fd6571ad5087..4d8b8c453d460 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesScheduleRunSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesScheduleRunSamples.java @@ -28,7 +28,7 @@ /** Samples for Registries ScheduleRun. */ public final class RegistriesScheduleRunSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json */ /** * Sample code: Registries_ScheduleRun_FileTaskRun. @@ -63,7 +63,7 @@ public static void registriesScheduleRunFileTaskRun(com.azure.resourcemanager.Az } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun.json */ /** * Sample code: Registries_ScheduleRun. @@ -101,7 +101,7 @@ public static void registriesScheduleRun(com.azure.resourcemanager.AzureResource } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json */ /** * Sample code: Registries_ScheduleRun_EncodedTaskRun. @@ -134,7 +134,7 @@ public static void registriesScheduleRunEncodedTaskRun(com.azure.resourcemanager } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json */ /** * Sample code: Registries_ScheduleRun_WithCustomCredentials. @@ -192,7 +192,7 @@ public static void registriesScheduleRunWithCustomCredentials( } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json */ /** * Sample code: Registries_ScheduleRun_WithLogTemplate. @@ -231,7 +231,7 @@ public static void registriesScheduleRunWithLogTemplate(com.azure.resourcemanage } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_Task.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_Task.json */ /** * Sample code: Registries_ScheduleRun_Task. @@ -280,7 +280,7 @@ public static void registriesScheduleRunTask(com.azure.resourcemanager.AzureReso } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json */ /** * Sample code: Registries_ScheduleRun_Task_WithCustomCredentials. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java index 3e33157e8d502..9b4abb9025c45 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesUpdateSamples.java @@ -13,7 +13,7 @@ /** Samples for Registries Update. */ public final class RegistriesUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/RegistryUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/RegistryUpdate.json */ /** * Sample code: RegistryUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java index 9f27202ce9271..bb0ba264bc31f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for Replications Create. */ public final class ReplicationsCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ReplicationCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ReplicationCreate.json */ /** * Sample code: ReplicationCreate. @@ -34,7 +34,7 @@ public static void replicationCreate(com.azure.resourcemanager.AzureResourceMana } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ReplicationCreateZoneRedundant.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ReplicationCreateZoneRedundant.json */ /** * Sample code: ReplicationCreateZoneRedundant. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java index 301304555ee78..27816b0290c6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Replications Delete. */ public final class ReplicationsDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ReplicationDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ReplicationDelete.json */ /** * Sample code: ReplicationDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java index dcccba7902b66..38c5d1a40f9d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Replications Get. */ public final class ReplicationsGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ReplicationGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ReplicationGet.json */ /** * Sample code: ReplicationGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java index 5871ac23bb0c1..2c101e6c67dbe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Replications List. */ public final class ReplicationsListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ReplicationList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ReplicationList.json */ /** * Sample code: ReplicationList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java index 2404f9e602e5d..b60aa0c6f93d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ReplicationsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Replications Update. */ public final class ReplicationsUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ReplicationUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ReplicationUpdate.json */ /** * Sample code: ReplicationUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsCancelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsCancelSamples.java index be8e63ff60b6a..1b8d55de348b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsCancelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsCancelSamples.java @@ -7,7 +7,7 @@ /** Samples for Runs Cancel. */ public final class RunsCancelSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsCancel.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsCancel.json */ /** * Sample code: Runs_Cancel. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetLogSasUrlSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetLogSasUrlSamples.java index 3da66e388cef8..22ae238ae9af5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetLogSasUrlSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetLogSasUrlSamples.java @@ -7,7 +7,7 @@ /** Samples for Runs GetLogSasUrl. */ public final class RunsGetLogSasUrlSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGetLogSasUrl.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGetLogSasUrl.json */ /** * Sample code: Runs_GetLogSasUrl. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetSamples.java index 1d9e45101653a..893df503bc17b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Runs Get. */ public final class RunsGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json */ /** * Sample code: Runs_Get. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsListSamples.java index 0cec0ffa7fa93..33f21287518f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Runs List. */ public final class RunsListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsList.json */ /** * Sample code: Runs_List. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsUpdateSamples.java index 0dee718fb692d..56af994b47727 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Runs Update. */ public final class RunsUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsUpdate.json */ /** * Sample code: Runs_Update. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java index 9d4c3119cac13..586b8e4286bf8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsCreateSamples.java @@ -10,7 +10,7 @@ /** Samples for ScopeMaps Create. */ public final class ScopeMapsCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ScopeMapCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ScopeMapCreate.json */ /** * Sample code: ScopeMapCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java index 7051e44fb2963..82b3fd629fff0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ScopeMaps Delete. */ public final class ScopeMapsDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ScopeMapDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ScopeMapDelete.json */ /** * Sample code: ScopeMapDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java index b89ef773755a7..f978a2ce2b66f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ScopeMaps Get. */ public final class ScopeMapsGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ScopeMapGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ScopeMapGet.json */ /** * Sample code: ScopeMapGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java index f373f4dd2551c..7c380d65d883d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ScopeMaps List. */ public final class ScopeMapsListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ScopeMapList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ScopeMapList.json */ /** * Sample code: ScopeMapList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java index f543121cf51a0..0143e7fd42c24 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/ScopeMapsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for ScopeMaps Update. */ public final class ScopeMapsUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/ScopeMapUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/ScopeMapUpdate.json */ /** * Sample code: ScopeMapUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsCreateSamples.java index 85be8dfbd64d7..99174064002d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsCreateSamples.java @@ -15,7 +15,7 @@ /** Samples for TaskRuns Create. */ public final class TaskRunsCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsCreate.json */ /** * Sample code: TaskRuns_Create. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsDeleteSamples.java index b2ae1614ead38..b706d36a88860 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for TaskRuns Delete. */ public final class TaskRunsDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsDelete.json */ /** * Sample code: TaskRuns_Delete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetDetailsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetDetailsSamples.java index bcf4927375a35..99cac126c5238 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetDetailsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetDetailsSamples.java @@ -7,7 +7,7 @@ /** Samples for TaskRuns GetDetails. */ public final class TaskRunsGetDetailsSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGetDetails.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGetDetails.json */ /** * Sample code: TaskRuns_GetDetails. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetSamples.java index e7fd31a299c63..1d25d44b4dfdb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for TaskRuns Get. */ public final class TaskRunsGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json */ /** * Sample code: TaskRuns_Get. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsListSamples.java index 61dea5481b4b5..210711743187d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsListSamples.java @@ -7,7 +7,7 @@ /** Samples for TaskRuns List. */ public final class TaskRunsListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsList.json */ /** * Sample code: TaskRuns_List. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsUpdateSamples.java index 5bb4493a3ad15..75402e4a7c919 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for TaskRuns Update. */ public final class TaskRunsUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsUpdate.json */ /** * Sample code: TaskRuns_Update. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksCreateSamples.java index 86444011d441a..e870141a20176 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksCreateSamples.java @@ -33,7 +33,7 @@ /** Samples for Tasks Create. */ public final class TasksCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json */ /** * Sample code: Tasks_Create_WithUserIdentities_WithSystemIdentity. @@ -105,7 +105,7 @@ public static void tasksCreateWithUserIdentitiesWithSystemIdentity( } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate.json */ /** * Sample code: Tasks_Create. @@ -179,7 +179,7 @@ public static void tasksCreate(com.azure.resourcemanager.AzureResourceManager az } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json */ /** * Sample code: Tasks_Create_WithSystemAndUserIdentities. @@ -258,7 +258,7 @@ public static void tasksCreateWithSystemAndUserIdentities(com.azure.resourcemana } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json */ /** * Sample code: Tasks_Create_WithUserIdentities. @@ -339,7 +339,7 @@ public static void tasksCreateWithUserIdentities(com.azure.resourcemanager.Azure } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate_QuickTask.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate_QuickTask.json */ /** * Sample code: Tasks_Create_QuickTask. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksDeleteSamples.java index 12d14251f70d5..2a2f2487b387d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Tasks Delete. */ public final class TasksDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksDelete.json */ /** * Sample code: Tasks_Delete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetDetailsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetDetailsSamples.java index 32d7ea63a770d..eca1e0771a419 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetDetailsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetDetailsSamples.java @@ -7,7 +7,7 @@ /** Samples for Tasks GetDetails. */ public final class TasksGetDetailsSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGetDetails.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGetDetails.json */ /** * Sample code: Tasks_GetDetails. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetSamples.java index f6cb77ad3fb83..024aeda4c3e52 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Tasks Get. */ public final class TasksGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json */ /** * Sample code: Tasks_Get. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksListSamples.java index c1fc8469c1e67..bcedeabb45ffa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksListSamples.java @@ -7,7 +7,7 @@ /** Samples for Tasks List. */ public final class TasksListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksList.json */ /** * Sample code: Tasks_List. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksUpdateSamples.java index 8281b08265557..98753907d614c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksUpdateSamples.java @@ -25,7 +25,7 @@ /** Samples for Tasks Update. */ public final class TasksUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_QuickTask.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_QuickTask.json */ /** * Sample code: Tasks_Update_QuickTask. @@ -50,7 +50,7 @@ public static void tasksUpdateQuickTask(com.azure.resourcemanager.AzureResourceM } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json */ /** * Sample code: Tasks_Update_WithMSICustomCredentials. @@ -99,7 +99,7 @@ public static void tasksUpdateWithMSICustomCredentials(com.azure.resourcemanager } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json */ /** * Sample code: Tasks_Update_WithKeyVaultCustomCredentials. @@ -157,7 +157,7 @@ public static void tasksUpdateWithKeyVaultCustomCredentials(com.azure.resourcema } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate.json */ /** * Sample code: Tasks_Update. @@ -214,7 +214,7 @@ public static void tasksUpdate(com.azure.resourcemanager.AzureResourceManager az } /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json */ /** * Sample code: Tasks_Update_WithOpaqueCustomCredentials. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java index 74c78521a0e41..1106cc3e38ce0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensCreateSamples.java @@ -14,7 +14,7 @@ /** Samples for Tokens Create. */ public final class TokensCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/TokenCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/TokenCreate.json */ /** * Sample code: TokenCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java index 1b9a61998817d..580601cbd4728 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Tokens Delete. */ public final class TokensDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/TokenDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/TokenDelete.json */ /** * Sample code: TokenDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java index 3ba34d04fd075..65697400980d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Tokens Get. */ public final class TokensGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/TokenGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/TokenGet.json */ /** * Sample code: TokenGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java index 85b8778571545..df9bf7944ace3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensListSamples.java @@ -7,7 +7,7 @@ /** Samples for Tokens List. */ public final class TokensListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/TokenList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/TokenList.json */ /** * Sample code: TokenList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java index 8590ead503755..0892ede91ad48 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TokensUpdateSamples.java @@ -13,7 +13,7 @@ /** Samples for Tokens Update. */ public final class TokensUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/TokenUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/TokenUpdate.json */ /** * Sample code: TokenUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java index 8b3e6f6e34f56..192e2de9473c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksCreateSamples.java @@ -14,7 +14,7 @@ /** Samples for Webhooks Create. */ public final class WebhooksCreateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookCreate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookCreate.json */ /** * Sample code: WebhookCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java index 75e287153d5ac..a66e1d2fd1107 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Webhooks Delete. */ public final class WebhooksDeleteSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookDelete.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookDelete.json */ /** * Sample code: WebhookDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java index 81ee64aef54ce..14b656755493b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetCallbackConfigSamples.java @@ -7,7 +7,7 @@ /** Samples for Webhooks GetCallbackConfig. */ public final class WebhooksGetCallbackConfigSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookGetCallbackConfig.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookGetCallbackConfig.json */ /** * Sample code: WebhookGetCallbackConfig. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java index 87242bb84a823..fc2f965e20a6b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Webhooks Get. */ public final class WebhooksGetSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookGet.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookGet.json */ /** * Sample code: WebhookGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java index fa41b2315967a..fdc2fc836f59b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListEventsSamples.java @@ -7,7 +7,7 @@ /** Samples for Webhooks ListEvents. */ public final class WebhooksListEventsSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookListEvents.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookListEvents.json */ /** * Sample code: WebhookListEvents. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java index b49fe0031bb7d..bc76ff5f2b077 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksListSamples.java @@ -7,7 +7,7 @@ /** Samples for Webhooks List. */ public final class WebhooksListSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookList.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookList.json */ /** * Sample code: WebhookList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java index ca57242b6c72f..974e21d90f0e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksPingSamples.java @@ -7,7 +7,7 @@ /** Samples for Webhooks Ping. */ public final class WebhooksPingSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookPing.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookPing.json */ /** * Sample code: WebhookPing. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java index 2fea5ab867d72..cd858465982ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/WebhooksUpdateSamples.java @@ -14,7 +14,7 @@ /** Samples for Webhooks Update. */ public final class WebhooksUpdateSamples { /* - * x-ms-original-file: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2022-12-01/examples/WebhookUpdate.json + * x-ms-original-file: mgmt_containerregistry_add_readonly/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2023-07-01/examples/WebhookUpdate.json */ /** * Sample code: WebhookUpdate.