diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 517e6d80f52c..99040f2dc72c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -2,13 +2,16 @@ ## 2.55.0-beta.2 (Unreleased) -### Features Added - ### Breaking Changes -### Bugs Fixed +#### Changes to `ContainerRegistryManagementClient` Class -### Other Changes +- Moved `ContainerRegistryManager.serviceClient().getAgentPools()` to `ContainerRegistryManager.taskClient().getAgentPools()`. +- Moved `ContainerRegistryManager.serviceClient().getRuns()` to `ContainerRegistryManager.taskClient().getRuns()`. +- Moved `ContainerRegistryManager.serviceClient().getTaskRuns()` to `ContainerRegistryManager.taskClient().getTaskRuns()`. +- Moved `ContainerRegistryManager.serviceClient().getTasks()` to `ContainerRegistryManager.taskClient().getTasks()`. +- Moved `ContainerRegistryManager.serviceClient().getRegistries().scheduleRun(...)` to `ContainerRegistryManager.taskClient().getRegistryTasks().scheduleRun(...)`. +- Moved `ContainerRegistryManager.serviceClient().getRegistries().getBuildSourceUploadUrl(...)` to `ContainerRegistryManager.taskClient().getRegistryTasks().getBuildSourceUploadUrl(...)`. ## 2.55.0-beta.1 (2025-12-04) diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java index 6dc65d0cd3d9..642f98bbe52b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/ContainerRegistryManager.java @@ -6,7 +6,9 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryManagementClient; +import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryTasksManagementClient; import com.azure.resourcemanager.containerregistry.implementation.ContainerRegistryManagementClientBuilder; +import com.azure.resourcemanager.containerregistry.implementation.ContainerRegistryTasksManagementClientBuilder; import com.azure.resourcemanager.containerregistry.implementation.RegistriesImpl; import com.azure.resourcemanager.containerregistry.implementation.RegistryTaskRunsImpl; import com.azure.resourcemanager.containerregistry.implementation.RegistryTasksImpl; @@ -28,6 +30,8 @@ public final class ContainerRegistryManager extends Manager regenerateCredentialWithResponse(St @ServiceMethod(returns = ReturnType.SINGLE) RegistryListCredentialsResultInner regenerateCredential(String resourceGroupName, String registryName, RegenerateCredentialParameters regenerateCredentialParameters); - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> scheduleRunWithResponseAsync(String resourceGroupName, String registryName, - RunRequest runRequest); - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, RunInner> beginScheduleRunAsync(String resourceGroupName, String registryName, - RunRequest runRequest); - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, - RunRequest runRequest); - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, - RunRequest runRequest, Context context); - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest); - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest); - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest, Context context); - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getBuildSourceUploadUrlWithResponseAsync(String resourceGroupName, - String registryName); - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getBuildSourceUploadUrlAsync(String resourceGroupName, String registryName); - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getBuildSourceUploadUrlWithResponse(String resourceGroupName, - String registryName, Context context); - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceUploadDefinitionInner getBuildSourceUploadUrl(String resourceGroupName, String registryName); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistryTasksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistryTasksClient.java new file mode 100644 index 000000000000..24b172ae4ea6 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RegistryTasksClient.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerregistry.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.RunInner; +import com.azure.resourcemanager.containerregistry.fluent.models.SourceUploadDefinitionInner; +import com.azure.resourcemanager.containerregistry.models.RunRequest; +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 RegistryTasksClient. + */ +public interface RegistryTasksClient { + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> scheduleRunWithResponseAsync(String resourceGroupName, String registryName, + RunRequest runRequest); + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, RunInner> beginScheduleRunAsync(String resourceGroupName, String registryName, + RunRequest runRequest); + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, + RunRequest runRequest); + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, + RunRequest runRequest, Context context); + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest); + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest); + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest, Context context); + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getBuildSourceUploadUrlWithResponseAsync(String resourceGroupName, + String registryName); + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getBuildSourceUploadUrlAsync(String resourceGroupName, String registryName); + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBuildSourceUploadUrlWithResponse(String resourceGroupName, + String registryName, Context context); + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SourceUploadDefinitionInner getBuildSourceUploadUrl(String resourceGroupName, String registryName); +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java index 229f30005c99..d6c282196a48 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/RunsClient.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java index 44919b70d17e..8ab63b2f8e28 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TaskRunsClient.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java index 93e132854de2..65cf89781850 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/TasksClient.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolInner.java index 49322ead9632..e575d38d296e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolProperties.java index a8796ceb0dce..7376202c1ffe 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolPropertiesUpdateParameters.java index 56c452919609..0d731bdc76c5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolPropertiesUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolPropertiesUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolQueueStatusInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolQueueStatusInner.java index ce56385fdb1a..e626204e745b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolQueueStatusInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/AgentPoolQueueStatusInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunGetLogResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunGetLogResultInner.java index 4139898a883a..9d262a72261f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunGetLogResultInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunGetLogResultInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunInner.java index 1d7449348ee0..a98935a66352 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunProperties.java index afb15caa1a57..bcc8c5687eb5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/SourceUploadDefinitionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/SourceUploadDefinitionInner.java index 4bd6a1c5e738..2a76cb1c3983 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/SourceUploadDefinitionInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/SourceUploadDefinitionInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskInner.java index 70311f245a8d..e0f7cb0bad67 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskProperties.java index 2f691252ba66..c04bbc274a5b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskPropertiesUpdateParameters.java index 818113676c2f..07550d431eee 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskPropertiesUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskPropertiesUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunInner.java index 4d9203fa1fb9..c61d51902590 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesInner.java index 63dc11e58390..5259d3728bfd 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesInner.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesInner.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesUpdateParameters.java index fbb11f0330a5..63f7171e81d5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/TaskRunPropertiesUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/AgentPoolsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/AgentPoolsClientImpl.java index a805c61d0ae6..d99667a60b4e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/AgentPoolsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/AgentPoolsClientImpl.java @@ -1,6 +1,5 @@ // 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; @@ -54,25 +53,25 @@ public final class AgentPoolsClientImpl implements AgentPoolsClient { /** * The service client containing this operation class. */ - private final ContainerRegistryManagementClientImpl client; + private final ContainerRegistryTasksManagementClientImpl client; /** * Initializes an instance of AgentPoolsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AgentPoolsClientImpl(ContainerRegistryManagementClientImpl client) { + AgentPoolsClientImpl(ContainerRegistryTasksManagementClientImpl client) { this.service = RestProxy.create(AgentPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerRegistryManagementClientAgentPools to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ContainerRegistryTasksManagementClientAgentPools to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ContainerRegistryManagementClientAgentPools") + @ServiceInterface(name = "ContainerRegistryTasksManagementClientAgentPools") public interface AgentPoolsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}") @@ -176,11 +175,10 @@ public Mono> getWithResponseAsync(String resourceGroupN if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, agentPoolName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), agentPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -218,11 +216,10 @@ private Mono> getWithResponseAsync(String resourceGroup if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, agentPoolName, accept, context); + this.client.getApiVersion(), agentPoolName, accept, context); } /** @@ -315,11 +312,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { agentPool.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, agentPoolName, agentPool, accept, context)) + .withContext( + context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, this.client.getApiVersion(), agentPoolName, agentPool, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -363,11 +360,10 @@ private Mono>> createWithResponseAsync(String resource } else { agentPool.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, agentPoolName, agentPool, accept, context); + registryName, this.client.getApiVersion(), agentPoolName, agentPool, accept, context); } /** @@ -560,11 +556,10 @@ public Mono>> deleteWithResponseAsync(String resourceG if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, agentPoolName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), agentPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -601,11 +596,10 @@ private Mono>> deleteWithResponseAsync(String resource if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, agentPoolName, accept, context); + registryName, this.client.getApiVersion(), agentPoolName, accept, context); } /** @@ -791,11 +785,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { updateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, agentPoolName, updateParameters, accept, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, this.client.getApiVersion(), agentPoolName, updateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -840,11 +834,10 @@ private Mono>> updateWithResponseAsync(String resource } else { updateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, agentPoolName, updateParameters, accept, context); + registryName, this.client.getApiVersion(), agentPoolName, updateParameters, accept, context); } /** @@ -1032,11 +1025,10 @@ private Mono> listSinglePageAsync(String resourceG if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), 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())); @@ -1071,12 +1063,11 @@ private Mono> listSinglePageAsync(String resourceG if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, accept, context) + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1178,11 +1169,10 @@ public Mono> getQueueStatusWithResponseAsync if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getQueueStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, agentPoolName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), agentPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1220,11 +1210,10 @@ private Mono> getQueueStatusWithResponseAsyn if (agentPoolName == null) { return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getQueueStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, agentPoolName, accept, context); + registryName, this.client.getApiVersion(), agentPoolName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java index 80259eabafc2..d13e96681ec0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CacheRulesClientImpl.java @@ -157,11 +157,10 @@ private Mono> listSinglePageAsync(String resourceG if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -197,12 +196,11 @@ private Mono> listSinglePageAsync(String resourceG if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-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) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -308,11 +306,10 @@ public Mono> getWithResponseAsync(String resourceGroupN if (cacheRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, cacheRuleName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -350,11 +347,10 @@ private Mono> getWithResponseAsync(String resourceGroup if (cacheRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); } - final String apiVersion = "2025-11-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); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, accept, context); } /** @@ -448,12 +444,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { cacheRuleCreateParameters.validate(); } - final String apiVersion = "2025-11-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)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, + cacheRuleCreateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -498,11 +493,10 @@ private Mono>> createWithResponseAsync(String resource } else { cacheRuleCreateParameters.validate(); } - final String apiVersion = "2025-11-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); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, cacheRuleCreateParameters, accept, context); } /** @@ -705,12 +699,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { cacheRuleUpdateParameters.validate(); } - final String apiVersion = "2025-11-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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, + cacheRuleUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -755,11 +748,10 @@ private Mono>> updateWithResponseAsync(String resource } else { cacheRuleUpdateParameters.validate(); } - final String apiVersion = "2025-11-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); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, cacheRuleUpdateParameters, accept, context); } /** @@ -956,10 +948,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (cacheRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, cacheRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -997,11 +988,10 @@ private Mono>> deleteWithResponseAsync(String resource if (cacheRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter cacheRuleName is required and cannot be null.")); } - final String apiVersion = "2025-11-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); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, cacheRuleName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java index babaa45ad9aa..b6ad0c58b8fa 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ConnectedRegistriesClientImpl.java @@ -175,11 +175,10 @@ private Mono> listSinglePageAsync(String r if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, filter, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, filter, 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())); @@ -218,12 +217,11 @@ private Mono> listSinglePageAsync(String r if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, filter, accept, context) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, filter, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -360,11 +358,9 @@ public Mono> getWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -403,11 +399,10 @@ private Mono> getWithResponseAsync(String resou return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, connectedRegistryName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, accept, context); } /** @@ -503,10 +498,9 @@ public Mono>> createWithResponseAsync(String resourceG } else { connectedRegistryCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -554,11 +548,10 @@ private Mono>> createWithResponseAsync(String resource } else { connectedRegistryCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, connectedRegistryName, connectedRegistryCreateParameters, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, connectedRegistryCreateParameters, accept, context); } /** @@ -776,10 +769,9 @@ public Mono>> updateWithResponseAsync(String resourceG } else { connectedRegistryUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -828,11 +820,10 @@ private Mono>> updateWithResponseAsync(String resource } else { connectedRegistryUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, connectedRegistryName, connectedRegistryUpdateParameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, connectedRegistryUpdateParameters, accept, context); } /** @@ -1044,12 +1035,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1087,11 +1075,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, connectedRegistryName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, connectedRegistryName, accept, context); } /** @@ -1271,12 +1258,11 @@ public Mono>> deactivateWithResponseAsync(String resou return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.deactivate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, accept, context)) + .withContext(context -> service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1314,11 +1300,10 @@ private Mono>> deactivateWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter connectedRegistryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.deactivate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, connectedRegistryName, accept, context); + return service.deactivate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, connectedRegistryName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java index 939a27a25c68..1f67f083ab3b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryManagementClientImpl.java @@ -8,7 +8,6 @@ import com.azure.core.http.HttpPipeline; 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.ConnectedRegistriesClient; import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryManagementClient; @@ -17,10 +16,7 @@ import com.azure.resourcemanager.containerregistry.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerregistry.fluent.RegistriesClient; import com.azure.resourcemanager.containerregistry.fluent.ReplicationsClient; -import com.azure.resourcemanager.containerregistry.fluent.RunsClient; import com.azure.resourcemanager.containerregistry.fluent.ScopeMapsClient; -import com.azure.resourcemanager.containerregistry.fluent.TaskRunsClient; -import com.azure.resourcemanager.containerregistry.fluent.TasksClient; import com.azure.resourcemanager.containerregistry.fluent.TokensClient; import com.azure.resourcemanager.containerregistry.fluent.WebhooksClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; @@ -60,6 +56,20 @@ public String getEndpoint() { return this.endpoint; } + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + /** * The HTTP pipeline to send requests through. */ @@ -242,62 +252,6 @@ public WebhooksClient getWebhooks() { return this.webhooks; } - /** - * The AgentPoolsClient object to access its operations. - */ - private final AgentPoolsClient agentPools; - - /** - * Gets the AgentPoolsClient object to access its operations. - * - * @return the AgentPoolsClient object. - */ - public AgentPoolsClient getAgentPools() { - return this.agentPools; - } - - /** - * The RunsClient object to access its operations. - */ - private final RunsClient runs; - - /** - * Gets the RunsClient object to access its operations. - * - * @return the RunsClient object. - */ - public RunsClient getRuns() { - return this.runs; - } - - /** - * The TaskRunsClient object to access its operations. - */ - private final TaskRunsClient taskRuns; - - /** - * Gets the TaskRunsClient object to access its operations. - * - * @return the TaskRunsClient object. - */ - public TaskRunsClient getTaskRuns() { - return this.taskRuns; - } - - /** - * The TasksClient object to access its operations. - */ - private final TasksClient tasks; - - /** - * Gets the TasksClient object to access its operations. - * - * @return the TasksClient object. - */ - public TasksClient getTasks() { - return this.tasks; - } - /** * Initializes an instance of ContainerRegistryManagementClient client. * @@ -316,6 +270,7 @@ public TasksClient getTasks() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.apiVersion = "2025-11-01"; this.operations = new OperationsClientImpl(this); this.registries = new RegistriesClientImpl(this); this.cacheRules = new CacheRulesClientImpl(this); @@ -326,9 +281,5 @@ public TasksClient getTasks() { this.scopeMaps = new ScopeMapsClientImpl(this); this.tokens = new TokensClientImpl(this); this.webhooks = new WebhooksClientImpl(this); - this.agentPools = new AgentPoolsClientImpl(this); - this.runs = new RunsClientImpl(this); - this.taskRuns = new TaskRunsClientImpl(this); - this.tasks = new TasksClientImpl(this); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryTasksManagementClientBuilder.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryTasksManagementClientBuilder.java new file mode 100644 index 000000000000..edb93ee0dff7 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryTasksManagementClientBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerregistry.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the ContainerRegistryTasksManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ContainerRegistryTasksManagementClientImpl.class }) +public final class ContainerRegistryTasksManagementClientBuilder { + /* + * The Microsoft Azure subscription ID. + */ + private String subscriptionId; + + /** + * Sets The Microsoft Azure subscription ID. + * + * @param subscriptionId the subscriptionId value. + * @return the ContainerRegistryTasksManagementClientBuilder. + */ + public ContainerRegistryTasksManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the ContainerRegistryTasksManagementClientBuilder. + */ + public ContainerRegistryTasksManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the ContainerRegistryTasksManagementClientBuilder. + */ + public ContainerRegistryTasksManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the ContainerRegistryTasksManagementClientBuilder. + */ + public ContainerRegistryTasksManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the ContainerRegistryTasksManagementClientBuilder. + */ + public ContainerRegistryTasksManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the ContainerRegistryTasksManagementClientBuilder. + */ + public ContainerRegistryTasksManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of ContainerRegistryTasksManagementClientImpl with the provided parameters. + * + * @return an instance of ContainerRegistryTasksManagementClientImpl. + */ + public ContainerRegistryTasksManagementClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ContainerRegistryTasksManagementClientImpl client + = new ContainerRegistryTasksManagementClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + return client; + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryTasksManagementClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryTasksManagementClientImpl.java new file mode 100644 index 000000000000..bd74c82f5dc5 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ContainerRegistryTasksManagementClientImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerregistry.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpPipeline; +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.ContainerRegistryTasksManagementClient; +import com.azure.resourcemanager.containerregistry.fluent.RegistryTasksClient; +import com.azure.resourcemanager.containerregistry.fluent.RunsClient; +import com.azure.resourcemanager.containerregistry.fluent.TaskRunsClient; +import com.azure.resourcemanager.containerregistry.fluent.TasksClient; +import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; +import java.time.Duration; + +/** + * Initializes a new instance of the ContainerRegistryTasksManagementClientImpl type. + */ +@ServiceClient(builder = ContainerRegistryTasksManagementClientBuilder.class) +public final class ContainerRegistryTasksManagementClientImpl extends AzureServiceClient + implements ContainerRegistryTasksManagementClient { + /** + * The Microsoft Azure subscription ID. + */ + private final String subscriptionId; + + /** + * Gets The Microsoft Azure subscription ID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The AgentPoolsClient object to access its operations. + */ + private final AgentPoolsClient agentPools; + + /** + * Gets the AgentPoolsClient object to access its operations. + * + * @return the AgentPoolsClient object. + */ + public AgentPoolsClient getAgentPools() { + return this.agentPools; + } + + /** + * The RegistryTasksClient object to access its operations. + */ + private final RegistryTasksClient registryTasks; + + /** + * Gets the RegistryTasksClient object to access its operations. + * + * @return the RegistryTasksClient object. + */ + public RegistryTasksClient getRegistryTasks() { + return this.registryTasks; + } + + /** + * The RunsClient object to access its operations. + */ + private final RunsClient runs; + + /** + * Gets the RunsClient object to access its operations. + * + * @return the RunsClient object. + */ + public RunsClient getRuns() { + return this.runs; + } + + /** + * The TaskRunsClient object to access its operations. + */ + private final TaskRunsClient taskRuns; + + /** + * Gets the TaskRunsClient object to access its operations. + * + * @return the TaskRunsClient object. + */ + public TaskRunsClient getTaskRuns() { + return this.taskRuns; + } + + /** + * The TasksClient object to access its operations. + */ + private final TasksClient tasks; + + /** + * Gets the TasksClient object to access its operations. + * + * @return the TasksClient object. + */ + public TasksClient getTasks() { + return this.tasks; + } + + /** + * Initializes an instance of ContainerRegistryTasksManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The Microsoft Azure subscription ID. + * @param endpoint server parameter. + */ + ContainerRegistryTasksManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + super(httpPipeline, serializerAdapter, environment); + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2019-06-01-preview"; + this.agentPools = new AgentPoolsClientImpl(this); + this.registryTasks = new RegistryTasksClientImpl(this); + this.runs = new RunsClientImpl(this); + this.taskRuns = new TaskRunsClientImpl(this); + this.tasks = new TasksClientImpl(this); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java index 636294abe076..46b1d23d3622 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/CredentialSetsClientImpl.java @@ -159,11 +159,10 @@ private Mono> listSinglePageAsync(String resou if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -199,12 +198,11 @@ private Mono> listSinglePageAsync(String resou if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-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) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -311,11 +309,10 @@ public Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, credentialSetName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -354,11 +351,10 @@ private Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); } - final String apiVersion = "2025-11-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); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, accept, context); } /** @@ -453,12 +449,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { credentialSetCreateParameters.validate(); } - final String apiVersion = "2025-11-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)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, + credentialSetCreateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -504,11 +499,10 @@ private Mono>> createWithResponseAsync(String resource } else { credentialSetCreateParameters.validate(); } - final String apiVersion = "2025-11-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); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, credentialSetCreateParameters, accept, context); } /** @@ -723,12 +717,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { credentialSetUpdateParameters.validate(); } - final String apiVersion = "2025-11-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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, + credentialSetUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -774,11 +767,10 @@ private Mono>> updateWithResponseAsync(String resource } else { credentialSetUpdateParameters.validate(); } - final String apiVersion = "2025-11-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); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, credentialSetUpdateParameters, accept, context); } /** @@ -985,10 +977,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, credentialSetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1027,11 +1018,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter credentialSetName is required and cannot be null.")); } - final String apiVersion = "2025-11-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); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, credentialSetName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java index b499c9d2df2a..70f7a93d4bf6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/OperationsClientImpl.java @@ -91,9 +91,10 @@ private Mono> listSinglePageAsync() { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), 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())); @@ -115,10 +116,9 @@ private Mono> listSinglePageAsync(Contex return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, accept, context) + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java index ff679e12aab8..e8fbcb1e9ee0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/PrivateEndpointConnectionsClientImpl.java @@ -148,11 +148,10 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -188,12 +187,11 @@ private Mono> listSinglePageAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-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) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -302,11 +300,11 @@ public Mono> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, privateEndpointConnectionName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -345,11 +343,10 @@ private Mono> getWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, privateEndpointConnectionName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, privateEndpointConnectionName, accept, context); } /** @@ -449,10 +446,9 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { privateEndpointConnection.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, privateEndpointConnection, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -501,11 +497,11 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { privateEndpointConnection.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, privateEndpointConnectionName, privateEndpointConnection, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, + privateEndpointConnection, accept, context); } /** @@ -720,12 +716,11 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, privateEndpointConnectionName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -763,11 +758,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, privateEndpointConnectionName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, privateEndpointConnectionName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java index 00481ff3eb5c..f536a0b9868a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java @@ -40,8 +40,6 @@ import com.azure.resourcemanager.containerregistry.fluent.models.RegistryListCredentialsResultInner; import com.azure.resourcemanager.containerregistry.fluent.models.RegistryNameStatusInner; import com.azure.resourcemanager.containerregistry.fluent.models.RegistryUsageListResultInner; -import com.azure.resourcemanager.containerregistry.fluent.models.RunInner; -import com.azure.resourcemanager.containerregistry.fluent.models.SourceUploadDefinitionInner; import com.azure.resourcemanager.containerregistry.models.GenerateCredentialsParameters; import com.azure.resourcemanager.containerregistry.models.ImportImageParameters; import com.azure.resourcemanager.containerregistry.models.PrivateLinkResourceListResult; @@ -49,7 +47,6 @@ import com.azure.resourcemanager.containerregistry.models.RegistryListResult; import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest; import com.azure.resourcemanager.containerregistry.models.RegistryUpdateParameters; -import com.azure.resourcemanager.containerregistry.models.RunRequest; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; @@ -220,25 +217,6 @@ Mono> regenerateCredential(@HostPar @BodyParam("application/json") RegenerateCredentialParameters regenerateCredentialParameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> scheduleRun(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RunRequest runRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getBuildSourceUploadUrl(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -291,11 +269,11 @@ Mono> listPrivateLinkResourcesNext( } else { registryNameCheckRequest.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), registryNameCheckRequest, accept, context)) + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), registryNameCheckRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -328,11 +306,10 @@ Mono> listPrivateLinkResourcesNext( } else { registryNameCheckRequest.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - registryNameCheckRequest, accept, context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), registryNameCheckRequest, accept, context); } /** @@ -403,11 +380,10 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); @@ -433,10 +409,11 @@ private Mono> listSinglePageAsync(Context context) return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -518,10 +495,9 @@ private Mono> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -554,12 +530,11 @@ private Mono> listByResourceGroupSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, accept, context) + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -653,10 +628,9 @@ public Mono> getByResourceGroupWithResponseAsync(String if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -691,11 +665,10 @@ private Mono> getByResourceGroupWithResponseAsync(String if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); } /** @@ -781,10 +754,9 @@ public Mono>> createWithResponseAsync(String resourceG } else { registry.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, registry, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -825,11 +797,10 @@ private Mono>> createWithResponseAsync(String resource } else { registry.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, registry, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, registry, accept, context); } /** @@ -1014,12 +985,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { registryUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, registryUpdateParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, registryUpdateParameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1060,11 +1030,10 @@ private Mono>> updateWithResponseAsync(String resource } else { registryUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, registryUpdateParameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, registryUpdateParameters, accept, context); } /** @@ -1244,10 +1213,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1281,11 +1249,10 @@ private Mono>> deleteWithResponseAsync(String resource if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context); } /** @@ -1454,10 +1421,9 @@ public Mono>> generateCredentialsWithResponseAsync(Str } else { generateCredentialsParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.generateCredentials(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, generateCredentialsParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1500,11 +1466,11 @@ private Mono>> generateCredentialsWithResponseAsync(St } else { generateCredentialsParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.generateCredentials(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, generateCredentialsParameters, accept, context); + return service.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, generateCredentialsParameters, accept, + context); } /** @@ -1701,10 +1667,9 @@ public Mono>> importImageWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.importImage(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1744,11 +1709,10 @@ private Mono>> importImageWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.importImage(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, parameters, accept, context); + return service.importImage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, parameters, accept, context); } /** @@ -1926,10 +1890,9 @@ public Mono> listCredentialsWithRes if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listCredentials(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1964,11 +1927,10 @@ public Mono> listCredentialsWithRes if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listCredentials(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context); + return service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); } /** @@ -2049,10 +2011,9 @@ public Mono> listUsagesWithResponseAsync( if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listUsages(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2087,11 +2048,10 @@ private Mono> listUsagesWithResponseAsync if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listUsages(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context); + return service.listUsages(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); } /** @@ -2171,11 +2131,11 @@ public RegistryUsageListResultInner listUsages(String resourceGroupName, String if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listPrivateLinkResources(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) + .withContext( + context -> service.listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -2211,12 +2171,11 @@ public RegistryUsageListResultInner listUsages(String resourceGroupName, String if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listPrivateLinkResources(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context) + .listPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2326,11 +2285,11 @@ public Mono> getPrivateLinkResourceWithRespon if (groupName == null) { return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getPrivateLinkResource(this.client.getEndpoint(), apiVersion, - this.client.getSubscriptionId(), resourceGroupName, registryName, groupName, accept, context)) + .withContext( + context -> service.getPrivateLinkResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, groupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2368,11 +2327,10 @@ private Mono> getPrivateLinkResourceWithRespo if (groupName == null) { return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getPrivateLinkResource(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, groupName, accept, context); + return service.getPrivateLinkResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, groupName, accept, context); } /** @@ -2466,10 +2424,9 @@ public Mono> regenerateCredentialWi } else { regenerateCredentialParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateCredential(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, regenerateCredentialParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2514,11 +2471,11 @@ private Mono> regenerateCredentialW } else { regenerateCredentialParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.regenerateCredential(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, regenerateCredentialParameters, accept, context); + return service.regenerateCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, regenerateCredentialParameters, accept, + context); } /** @@ -2579,360 +2536,6 @@ public RegistryListCredentialsResultInner regenerateCredential(String resourceGr Context.NONE).getValue(); } - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> scheduleRunWithResponseAsync(String resourceGroupName, String registryName, - RunRequest runRequest) { - 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 (runRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter runRequest is required and cannot be null.")); - } else { - runRequest.validate(); - } - final String apiVersion = "2019-06-01-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.scheduleRun(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, runRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> scheduleRunWithResponseAsync(String resourceGroupName, String registryName, - RunRequest runRequest, 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 (runRequest == null) { - return Mono.error(new IllegalArgumentException("Parameter runRequest is required and cannot be null.")); - } else { - runRequest.validate(); - } - final String apiVersion = "2019-06-01-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.scheduleRun(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, runRequest, accept, context); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, RunInner> beginScheduleRunAsync(String resourceGroupName, - String registryName, RunRequest runRequest) { - Mono>> mono - = scheduleRunWithResponseAsync(resourceGroupName, registryName, runRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), RunInner.class, - RunInner.class, this.client.getContext()); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RunInner> beginScheduleRunAsync(String resourceGroupName, - String registryName, RunRequest runRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = scheduleRunWithResponseAsync(resourceGroupName, registryName, runRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), RunInner.class, - RunInner.class, context); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, - RunRequest runRequest) { - return this.beginScheduleRunAsync(resourceGroupName, registryName, runRequest).getSyncPoller(); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, - RunRequest runRequest, Context context) { - return this.beginScheduleRunAsync(resourceGroupName, registryName, runRequest, context).getSyncPoller(); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest) { - return beginScheduleRunAsync(resourceGroupName, registryName, runRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest, - Context context) { - return beginScheduleRunAsync(resourceGroupName, registryName, runRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest) { - return scheduleRunAsync(resourceGroupName, registryName, runRequest).block(); - } - - /** - * Schedules a new run based on the request parameters and add it to the run queue. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @param registryName The name of the container registry. - * @param runRequest The parameters of a run that needs to scheduled. - * @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 run resource properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest, Context context) { - return scheduleRunAsync(resourceGroupName, registryName, runRequest, context).block(); - } - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getBuildSourceUploadUrlWithResponseAsync(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 = "2019-06-01-preview"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getBuildSourceUploadUrl(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, registryName, apiVersion, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getBuildSourceUploadUrlWithResponseAsync(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 = "2019-06-01-preview"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getBuildSourceUploadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, accept, context); - } - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getBuildSourceUploadUrlAsync(String resourceGroupName, - String registryName) { - return getBuildSourceUploadUrlWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getBuildSourceUploadUrlWithResponse(String resourceGroupName, - String registryName, Context context) { - return getBuildSourceUploadUrlWithResponseAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Get the upload location for the user to be able to upload the source. - * - * @param resourceGroupName The name of the resource group to which the container registry belongs. - * @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 upload location for the user to be able to upload the source. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceUploadDefinitionInner getBuildSourceUploadUrl(String resourceGroupName, String registryName) { - return getBuildSourceUploadUrlWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - /** * Get the next page of items. * diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesImpl.java index bfbf3b9211fd..2867b40f313b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesImpl.java @@ -162,8 +162,8 @@ public SourceUploadDefinition getBuildSourceUploadUrl(String rgName, String acrN @Override public Mono getBuildSourceUploadUrlAsync(String rgName, String acrName) { return this.manager() - .serviceClient() - .getRegistries() + .taskClient() + .getRegistryTasks() .getBuildSourceUploadUrlAsync(rgName, acrName) .map(sourceUploadDefinitionInner -> new SourceUploadDefinitionImpl(sourceUploadDefinitionInner)); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryImpl.java index b6d4bb69378e..5f685c119992 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryImpl.java @@ -249,8 +249,8 @@ public SourceUploadDefinition getBuildSourceUploadUrl() { @Override public Mono getBuildSourceUploadUrlAsync() { return this.manager() - .serviceClient() - .getRegistries() + .taskClient() + .getRegistryTasks() .getBuildSourceUploadUrlAsync(this.resourceGroupName(), this.name()) .map(sourceUploadDefinitionInner -> new SourceUploadDefinitionImpl(sourceUploadDefinitionInner)); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskImpl.java index 9085bbb22681..3ca87965c994 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskImpl.java @@ -178,14 +178,14 @@ public Map sourceTriggers() { } RegistryTaskImpl(ContainerRegistryManager registryManager, String taskName) { - this.tasksInner = registryManager.serviceClient().getTasks(); + this.tasksInner = registryManager.taskClient().getTasks(); this.taskName = taskName; this.inner = new TaskInner(); this.taskUpdateParameters = new TaskUpdateParameters(); } RegistryTaskImpl(ContainerRegistryManager registryManager, TaskInner inner) { - this.tasksInner = registryManager.serviceClient().getTasks(); + this.tasksInner = registryManager.taskClient().getTasks(); this.taskName = inner.name(); this.inner = inner; this.resourceGroupName = ResourceUtils.groupFromResourceId(this.inner.id()); diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunImpl.java index 74f6dd2c2440..1339b2b72bf9 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunImpl.java @@ -4,7 +4,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.containerregistry.ContainerRegistryManager; -import com.azure.resourcemanager.containerregistry.fluent.RegistriesClient; +import com.azure.resourcemanager.containerregistry.fluent.RegistryTasksClient; import com.azure.resourcemanager.containerregistry.fluent.models.RunInner; import com.azure.resourcemanager.containerregistry.models.AgentProperties; import com.azure.resourcemanager.containerregistry.models.Architecture; @@ -40,7 +40,7 @@ class RegistryTaskRunImpl implements RegistryTaskRun, RegistryTaskRun.Definition private String resourceGroupName; private String registryName; private RunInner inner; - private RegistriesClient registriesInner; + private RegistryTasksClient registryTasksClient; private FileTaskRunRequest fileTaskRunRequest; private EncodedTaskRunRequest encodedTaskRunRequest; private DockerBuildRequest dockerTaskRunRequest; @@ -116,7 +116,7 @@ public String runId() { RegistryTaskRunImpl(ContainerRegistryManager registryManager, RunInner runInner) { this.registryManager = registryManager; - this.registriesInner = registryManager.serviceClient().getRegistries(); + this.registryTasksClient = registryManager.taskClient().getRegistryTasks(); this.platform = new PlatformProperties(); this.inner = runInner; @@ -301,28 +301,28 @@ public RegistryTaskRun execute() { public Mono executeAsync() { final RegistryTaskRunImpl self = this; if (this.fileTaskRunRequest != null) { - return this.registriesInner + return this.registryTasksClient .scheduleRunAsync(this.resourceGroupName(), this.registryName(), this.fileTaskRunRequest) .map(runInner -> { self.inner = runInner; return self; }); } else if (this.encodedTaskRunRequest != null) { - return this.registriesInner + return this.registryTasksClient .scheduleRunAsync(this.resourceGroupName(), this.registryName(), this.encodedTaskRunRequest) .map(runInner -> { self.inner = runInner; return self; }); } else if (this.dockerTaskRunRequest != null) { - return this.registriesInner + return this.registryTasksClient .scheduleRunAsync(this.resourceGroupName(), this.registryName(), this.dockerTaskRunRequest) .map(runInner -> { self.inner = runInner; return self; }); } else if (this.taskRunRequest != null) { - return this.registriesInner + return this.registryTasksClient .scheduleRunAsync(this.resourceGroupName(), this.registryName(), this.taskRunRequest) .map(runInner -> { self.inner = runInner; @@ -365,7 +365,7 @@ public RegistryTaskRun refresh() { @Override public Mono refreshAsync() { final RegistryTaskRunImpl self = this; - return registryManager.serviceClient() + return registryManager.taskClient() .getRuns() .getAsync(this.resourceGroupName(), this.registryName(), this.inner.runId()) .map(runInner -> { diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunsImpl.java index ce17ba64d1dc..575d5d6310dd 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunsImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTaskRunsImpl.java @@ -26,7 +26,7 @@ public RegistryTaskRun.DefinitionStages.BlankFromRuns scheduleRun() { @Override public PagedFlux listByRegistryAsync(String rgName, String acrName) { - return PagedConverter.mapPage(this.registryManager.serviceClient().getRuns().listAsync(rgName, acrName), + return PagedConverter.mapPage(this.registryManager.taskClient().getRuns().listAsync(rgName, acrName), inner -> wrapModel(inner)); } @@ -37,7 +37,7 @@ public PagedIterable listByRegistry(String rgName, String acrNa @Override public Mono getLogSasUrlAsync(String rgName, String acrName, String runId) { - return this.registryManager.serviceClient() + return this.registryManager.taskClient() .getRuns() .getLogSasUrlAsync(rgName, acrName, runId) .map(runGetLogResultInner -> runGetLogResultInner.logLink()); @@ -50,7 +50,7 @@ public String getLogSasUrl(String rgName, String acrName, String runId) { @Override public Mono cancelAsync(String rgName, String acrName, String runId) { - return this.registryManager.serviceClient().getRuns().cancelAsync(rgName, acrName, runId); + return this.registryManager.taskClient().getRuns().cancelAsync(rgName, acrName, runId); } @Override diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTasksClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTasksClientImpl.java new file mode 100644 index 000000000000..7c269a625297 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTasksClientImpl.java @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.containerregistry.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +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.PathParam; +import com.azure.core.annotation.Post; +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.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.RegistryTasksClient; +import com.azure.resourcemanager.containerregistry.fluent.models.RunInner; +import com.azure.resourcemanager.containerregistry.fluent.models.SourceUploadDefinitionInner; +import com.azure.resourcemanager.containerregistry.models.RunRequest; +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 RegistryTasksClient. + */ +public final class RegistryTasksClientImpl implements RegistryTasksClient { + /** + * The proxy service used to perform REST calls. + */ + private final RegistryTasksService service; + + /** + * The service client containing this operation class. + */ + private final ContainerRegistryTasksManagementClientImpl client; + + /** + * Initializes an instance of RegistryTasksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryTasksClientImpl(ContainerRegistryTasksManagementClientImpl client) { + this.service + = RestProxy.create(RegistryTasksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerRegistryTasksManagementClientRegistryTasks to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerRegistryTasksManagementClientRegistryTasks") + public interface RegistryTasksService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> scheduleRun(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RunRequest runRequest, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getBuildSourceUploadUrl(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> scheduleRunWithResponseAsync(String resourceGroupName, String registryName, + RunRequest runRequest) { + 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 (runRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter runRequest is required and cannot be null.")); + } else { + runRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.scheduleRun(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, registryName, this.client.getApiVersion(), runRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> scheduleRunWithResponseAsync(String resourceGroupName, String registryName, + RunRequest runRequest, 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 (runRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter runRequest is required and cannot be null.")); + } else { + runRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.scheduleRun(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, this.client.getApiVersion(), runRequest, accept, context); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, RunInner> beginScheduleRunAsync(String resourceGroupName, + String registryName, RunRequest runRequest) { + Mono>> mono + = scheduleRunWithResponseAsync(resourceGroupName, registryName, runRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), RunInner.class, + RunInner.class, this.client.getContext()); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RunInner> beginScheduleRunAsync(String resourceGroupName, + String registryName, RunRequest runRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = scheduleRunWithResponseAsync(resourceGroupName, registryName, runRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), RunInner.class, + RunInner.class, context); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, + RunRequest runRequest) { + return this.beginScheduleRunAsync(resourceGroupName, registryName, runRequest).getSyncPoller(); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RunInner> beginScheduleRun(String resourceGroupName, String registryName, + RunRequest runRequest, Context context) { + return this.beginScheduleRunAsync(resourceGroupName, registryName, runRequest, context).getSyncPoller(); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest) { + return beginScheduleRunAsync(resourceGroupName, registryName, runRequest).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest, + Context context) { + return beginScheduleRunAsync(resourceGroupName, registryName, runRequest, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest) { + return scheduleRunAsync(resourceGroupName, registryName, runRequest).block(); + } + + /** + * Schedules a new run based on the request parameters and add it to the run queue. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param runRequest The parameters of a run that needs to scheduled. + * @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 run resource properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest, Context context) { + return scheduleRunAsync(resourceGroupName, registryName, runRequest, context).block(); + } + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getBuildSourceUploadUrlWithResponseAsync(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 accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getBuildSourceUploadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, registryName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getBuildSourceUploadUrlWithResponseAsync(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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.getBuildSourceUploadUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, registryName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getBuildSourceUploadUrlAsync(String resourceGroupName, + String registryName) { + return getBuildSourceUploadUrlWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBuildSourceUploadUrlWithResponse(String resourceGroupName, + String registryName, Context context) { + return getBuildSourceUploadUrlWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Get the upload location for the user to be able to upload the source. + * + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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 upload location for the user to be able to upload the source. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SourceUploadDefinitionInner getBuildSourceUploadUrl(String resourceGroupName, String registryName) { + return getBuildSourceUploadUrlWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } +} diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTasksImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTasksImpl.java index 573db6b801cd..acee3739c8ad 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTasksImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistryTasksImpl.java @@ -29,7 +29,7 @@ public RegistryTask.DefinitionStages.Blank define(String name) { @Override public PagedFlux listByRegistryAsync(String resourceGroupName, String registryName) { return PagedConverter.mapPage( - this.registryManager.serviceClient().getTasks().listAsync(resourceGroupName, registryName), + this.registryManager.taskClient().getTasks().listAsync(resourceGroupName, registryName), inner -> wrapModel(inner)); } @@ -42,12 +42,12 @@ public PagedIterable listByRegistry(String resourceGroupName, Stri public Mono getByRegistryAsync(String resourceGroupName, String registryName, String taskName, boolean includeSecrets) { if (includeSecrets) { - return this.registryManager.serviceClient() + return this.registryManager.taskClient() .getTasks() .getDetailsAsync(resourceGroupName, registryName, taskName) .map(taskInner -> new RegistryTaskImpl(registryManager, taskInner)); } else { - return this.registryManager.serviceClient() + return this.registryManager.taskClient() .getTasks() .getAsync(resourceGroupName, registryName, taskName) .map(taskInner -> new RegistryTaskImpl(registryManager, taskInner)); @@ -62,7 +62,7 @@ public RegistryTask getByRegistry(String resourceGroupName, String registryName, @Override public Mono deleteByRegistryAsync(String resourceGroupName, String registryName, String taskName) { - return this.registryManager.serviceClient().getTasks().deleteAsync(resourceGroupName, registryName, taskName); + return this.registryManager.taskClient().getTasks().deleteAsync(resourceGroupName, registryName, taskName); } @Override @@ -75,6 +75,6 @@ private RegistryTaskImpl wrapModel(TaskInner innerModel) { } public TasksClient inner() { - return this.registryManager.serviceClient().getTasks(); + return this.registryManager.taskClient().getTasks(); } } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java index b123d623d553..1eb0e3ca8416 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ReplicationsClientImpl.java @@ -159,11 +159,10 @@ private Mono> listSinglePageAsync(String resourc if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -199,12 +198,11 @@ private Mono> listSinglePageAsync(String resourc if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-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) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -311,11 +309,10 @@ public Mono> getWithResponseAsync(String resourceGrou return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -354,11 +351,10 @@ private Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, replicationName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, accept, context); } /** @@ -452,12 +448,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { replication.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, replication, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, replication, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -502,11 +497,10 @@ private Mono>> createWithResponseAsync(String resource } else { replication.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, replicationName, replication, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, replication, accept, context); } /** @@ -710,12 +704,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { replicationUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, replicationName, replicationUpdateParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, + replicationUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -761,11 +754,10 @@ private Mono>> updateWithResponseAsync(String resource } else { replicationUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, replicationName, replicationUpdateParameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, replicationUpdateParameters, accept, context); } /** @@ -967,10 +959,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, replicationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1009,11 +1000,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter replicationName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, replicationName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, replicationName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RunsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RunsClientImpl.java index 5fcefe716dda..938a2a8cdd98 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RunsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RunsClientImpl.java @@ -1,6 +1,5 @@ // 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; @@ -52,24 +51,24 @@ public final class RunsClientImpl implements RunsClient { /** * The service client containing this operation class. */ - private final ContainerRegistryManagementClientImpl client; + private final ContainerRegistryTasksManagementClientImpl client; /** * Initializes an instance of RunsClientImpl. * * @param client the instance of the service client containing this operation class. */ - RunsClientImpl(ContainerRegistryManagementClientImpl client) { + RunsClientImpl(ContainerRegistryTasksManagementClientImpl client) { this.service = RestProxy.create(RunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerRegistryManagementClientRuns to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for ContainerRegistryTasksManagementClientRuns to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ContainerRegistryManagementClientRuns") + @ServiceInterface(name = "ContainerRegistryTasksManagementClientRuns") public interface RunsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs") @@ -161,11 +160,10 @@ private Mono> listSinglePageAsync(String resourceGroupNa if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, filter, top, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), filter, top, 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())); @@ -203,12 +201,11 @@ private Mono> listSinglePageAsync(String resourceGroupNa if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, filter, top, accept, context) + this.client.getApiVersion(), filter, top, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -340,11 +337,10 @@ public Mono> getWithResponseAsync(String resourceGroupName, S if (runId == null) { return Mono.error(new IllegalArgumentException("Parameter runId is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, runId, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), runId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -382,11 +378,10 @@ private Mono> getWithResponseAsync(String resourceGroupName, if (runId == null) { return Mono.error(new IllegalArgumentException("Parameter runId is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, runId, accept, context); + this.client.getApiVersion(), runId, accept, context); } /** @@ -479,11 +474,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { runUpdateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, runId, runUpdateParameters, accept, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, this.client.getApiVersion(), runId, runUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -527,11 +522,10 @@ private Mono>> updateWithResponseAsync(String resource } else { runUpdateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, runId, runUpdateParameters, accept, context); + registryName, this.client.getApiVersion(), runId, runUpdateParameters, accept, context); } /** @@ -724,11 +718,10 @@ public Mono> getLogSasUrlWithResponseAsync(String if (runId == null) { return Mono.error(new IllegalArgumentException("Parameter runId is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getLogSasUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, runId, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), runId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -765,11 +758,10 @@ private Mono> getLogSasUrlWithResponseAsync(Strin if (runId == null) { return Mono.error(new IllegalArgumentException("Parameter runId is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getLogSasUrl(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, runId, accept, context); + registryName, this.client.getApiVersion(), runId, accept, context); } /** @@ -855,11 +847,10 @@ public Mono>> cancelWithResponseAsync(String resourceG if (runId == null) { return Mono.error(new IllegalArgumentException("Parameter runId is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, runId, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), runId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -896,11 +887,10 @@ private Mono>> cancelWithResponseAsync(String resource if (runId == null) { return Mono.error(new IllegalArgumentException("Parameter runId is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, runId, accept, context); + registryName, this.client.getApiVersion(), runId, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java index ec4f85ae763d..1228c61f93db 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/ScopeMapsClientImpl.java @@ -157,11 +157,10 @@ private Mono> listSinglePageAsync(String resourceGr if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -197,12 +196,11 @@ private Mono> listSinglePageAsync(String resourceGr if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-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) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -308,11 +306,10 @@ public Mono> getWithResponseAsync(String resourceGroupNa if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -350,11 +347,10 @@ private Mono> getWithResponseAsync(String resourceGroupN if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, scopeMapName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, accept, context); } /** @@ -448,12 +444,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { scopeMapCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, + scopeMapCreateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -498,11 +493,10 @@ private Mono>> createWithResponseAsync(String resource } else { scopeMapCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, scopeMapName, scopeMapCreateParameters, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, scopeMapCreateParameters, accept, context); } /** @@ -704,12 +698,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { scopeMapUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, + scopeMapUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -754,11 +747,10 @@ private Mono>> updateWithResponseAsync(String resource } else { scopeMapUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, scopeMapName, scopeMapUpdateParameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, scopeMapUpdateParameters, accept, context); } /** @@ -952,10 +944,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, scopeMapName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -993,11 +984,10 @@ private Mono>> deleteWithResponseAsync(String resource if (scopeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeMapName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, scopeMapName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, scopeMapName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TaskRunsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TaskRunsClientImpl.java index de584279d1a3..2a64d7951e51 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TaskRunsClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TaskRunsClientImpl.java @@ -1,6 +1,5 @@ // 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; @@ -53,24 +52,24 @@ public final class TaskRunsClientImpl implements TaskRunsClient { /** * The service client containing this operation class. */ - private final ContainerRegistryManagementClientImpl client; + private final ContainerRegistryTasksManagementClientImpl client; /** * Initializes an instance of TaskRunsClientImpl. * * @param client the instance of the service client containing this operation class. */ - TaskRunsClientImpl(ContainerRegistryManagementClientImpl client) { + TaskRunsClientImpl(ContainerRegistryTasksManagementClientImpl client) { this.service = RestProxy.create(TaskRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerRegistryManagementClientTaskRuns to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ContainerRegistryTasksManagementClientTaskRuns to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ContainerRegistryManagementClientTaskRuns") + @ServiceInterface(name = "ContainerRegistryTasksManagementClientTaskRuns") public interface TaskRunsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}") @@ -173,11 +172,10 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (taskRunName == null) { return Mono.error(new IllegalArgumentException("Parameter taskRunName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskRunName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), taskRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -215,11 +213,10 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (taskRunName == null) { return Mono.error(new IllegalArgumentException("Parameter taskRunName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, taskRunName, accept, context); + this.client.getApiVersion(), taskRunName, accept, context); } /** @@ -312,11 +309,10 @@ public Mono>> createWithResponseAsync(String resourceG } else { taskRun.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskRunName, taskRun, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), taskRunName, taskRun, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -360,11 +356,10 @@ private Mono>> createWithResponseAsync(String resource } else { taskRun.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskRunName, taskRun, accept, context); + registryName, this.client.getApiVersion(), taskRunName, taskRun, accept, context); } /** @@ -556,11 +551,10 @@ public Mono>> deleteWithResponseAsync(String resourceG if (taskRunName == null) { return Mono.error(new IllegalArgumentException("Parameter taskRunName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskRunName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), taskRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -597,11 +591,10 @@ private Mono>> deleteWithResponseAsync(String resource if (taskRunName == null) { return Mono.error(new IllegalArgumentException("Parameter taskRunName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskRunName, accept, context); + registryName, this.client.getApiVersion(), taskRunName, accept, context); } /** @@ -786,11 +779,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { updateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskRunName, updateParameters, accept, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, this.client.getApiVersion(), taskRunName, updateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -835,11 +828,10 @@ private Mono>> updateWithResponseAsync(String resource } else { updateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskRunName, updateParameters, accept, context); + registryName, this.client.getApiVersion(), taskRunName, updateParameters, accept, context); } /** @@ -1033,11 +1025,10 @@ public Mono> getDetailsWithResponseAsync(String resourceG if (taskRunName == null) { return Mono.error(new IllegalArgumentException("Parameter taskRunName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDetails(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskRunName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), taskRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1075,11 +1066,10 @@ private Mono> getDetailsWithResponseAsync(String resource if (taskRunName == null) { return Mono.error(new IllegalArgumentException("Parameter taskRunName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getDetails(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskRunName, accept, context); + registryName, this.client.getApiVersion(), taskRunName, accept, context); } /** @@ -1161,11 +1151,10 @@ private Mono> listSinglePageAsync(String resourceGro if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), 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())); @@ -1200,12 +1189,11 @@ private Mono> listSinglePageAsync(String resourceGro if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, accept, context) + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TasksClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TasksClientImpl.java index 3b9b2c075e77..8d6e084fb4c1 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TasksClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TasksClientImpl.java @@ -1,6 +1,5 @@ // 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; @@ -53,24 +52,24 @@ public final class TasksClientImpl implements TasksClient { /** * The service client containing this operation class. */ - private final ContainerRegistryManagementClientImpl client; + private final ContainerRegistryTasksManagementClientImpl client; /** * Initializes an instance of TasksClientImpl. * * @param client the instance of the service client containing this operation class. */ - TasksClientImpl(ContainerRegistryManagementClientImpl client) { + TasksClientImpl(ContainerRegistryTasksManagementClientImpl client) { this.service = RestProxy.create(TasksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerRegistryManagementClientTasks to be used by the proxy + * The interface defining all the services for ContainerRegistryTasksManagementClientTasks to be used by the proxy * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "ContainerRegistryManagementClientTasks") + @ServiceInterface(name = "ContainerRegistryTasksManagementClientTasks") public interface TasksService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks") @@ -168,11 +167,10 @@ private Mono> listSinglePageAsync(String resourceGroupN if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), 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())); @@ -207,12 +205,11 @@ private Mono> listSinglePageAsync(String resourceGroupN if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, accept, context) + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -313,11 +310,10 @@ public Mono> getWithResponseAsync(String resourceGroupName, if (taskName == null) { return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), taskName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -354,11 +350,10 @@ private Mono> getWithResponseAsync(String resourceGroupName, if (taskName == null) { return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - apiVersion, taskName, accept, context); + this.client.getApiVersion(), taskName, accept, context); } /** @@ -452,11 +447,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { taskCreateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskName, taskCreateParameters, accept, context)) + .withContext( + context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, this.client.getApiVersion(), taskName, taskCreateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -501,11 +496,10 @@ private Mono>> createWithResponseAsync(String resource } else { taskCreateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskName, taskCreateParameters, accept, context); + registryName, this.client.getApiVersion(), taskName, taskCreateParameters, accept, context); } /** @@ -698,11 +692,10 @@ public Mono>> deleteWithResponseAsync(String resourceG if (taskName == null) { return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), taskName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -739,11 +732,10 @@ private Mono>> deleteWithResponseAsync(String resource if (taskName == null) { return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskName, accept, context); + registryName, this.client.getApiVersion(), taskName, accept, context); } /** @@ -928,11 +920,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { taskUpdateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskName, taskUpdateParameters, accept, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, this.client.getApiVersion(), taskName, taskUpdateParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -977,11 +969,10 @@ private Mono>> updateWithResponseAsync(String resource } else { taskUpdateParameters.validate(); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskName, taskUpdateParameters, accept, context); + registryName, this.client.getApiVersion(), taskName, taskUpdateParameters, accept, context); } /** @@ -1175,11 +1166,10 @@ public Mono> getDetailsWithResponseAsync(String resourceGrou if (taskName == null) { return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDetails(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, apiVersion, taskName, accept, context)) + resourceGroupName, registryName, this.client.getApiVersion(), taskName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1217,11 +1207,10 @@ private Mono> getDetailsWithResponseAsync(String resourceGro if (taskName == null) { return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); } - final String apiVersion = "2019-06-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getDetails(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, apiVersion, taskName, accept, context); + registryName, this.client.getApiVersion(), taskName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java index 663188f8932d..d79c1f67e496 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/TokensClientImpl.java @@ -155,11 +155,10 @@ private Mono> listSinglePageAsync(String resourceGroup if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -195,12 +194,11 @@ private Mono> listSinglePageAsync(String resourceGroup if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-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) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -306,11 +304,10 @@ public Mono> getWithResponseAsync(String resourceGroupName, if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -348,11 +345,10 @@ private Mono> getWithResponseAsync(String resourceGroupName if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, tokenName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, accept, context); } /** @@ -446,12 +442,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { tokenCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, tokenCreateParameters, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, tokenCreateParameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -496,11 +491,10 @@ private Mono>> createWithResponseAsync(String resource } else { tokenCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, tokenName, tokenCreateParameters, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, tokenCreateParameters, accept, context); } /** @@ -701,12 +695,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { tokenUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, tokenName, tokenUpdateParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, tokenUpdateParameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -751,11 +744,10 @@ private Mono>> updateWithResponseAsync(String resource } else { tokenUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, tokenName, tokenUpdateParameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, tokenUpdateParameters, accept, context); } /** @@ -948,10 +940,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, tokenName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -989,11 +980,10 @@ private Mono>> deleteWithResponseAsync(String resource if (tokenName == null) { return Mono.error(new IllegalArgumentException("Parameter tokenName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, tokenName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, tokenName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java index a18198403ca3..1c9f03ed1b48 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/WebhooksClientImpl.java @@ -196,11 +196,10 @@ private Mono> listSinglePageAsync(String resourceGro if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + 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())); @@ -236,12 +235,11 @@ private Mono> listSinglePageAsync(String resourceGro if (registryName == null) { return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); } - final String apiVersion = "2025-11-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) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -347,11 +345,10 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -389,11 +386,10 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, webhookName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context); } /** @@ -487,12 +483,11 @@ public Mono>> createWithResponseAsync(String resourceG } else { webhookCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, webhookCreateParameters, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, webhookCreateParameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -537,11 +532,10 @@ private Mono>> createWithResponseAsync(String resource } else { webhookCreateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, webhookName, webhookCreateParameters, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, webhookCreateParameters, accept, context); } /** @@ -743,12 +737,11 @@ public Mono>> updateWithResponseAsync(String resourceG } else { webhookUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, webhookUpdateParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, webhookUpdateParameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -793,11 +786,10 @@ private Mono>> updateWithResponseAsync(String resource } else { webhookUpdateParameters.validate(); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, webhookName, webhookUpdateParameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, webhookUpdateParameters, accept, context); } /** @@ -991,10 +983,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1032,11 +1023,10 @@ private Mono>> deleteWithResponseAsync(String resource if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, webhookName, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context); } /** @@ -1214,10 +1204,9 @@ public Mono> getCallbackConfigWithResponseAsync(St if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getCallbackConfig(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1256,11 +1245,10 @@ private Mono> getCallbackConfigWithResponseAsync(S if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getCallbackConfig(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context); + return service.getCallbackConfig(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context); } /** @@ -1349,10 +1337,9 @@ private Mono> listEventsSinglePageAsync(String resourc if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listEvents(this.client.getEndpoint(), apiVersion, + .withContext(context -> service.listEvents(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -1393,12 +1380,11 @@ private Mono> listEventsSinglePageAsync(String resourc if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listEvents(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, webhookName, accept, context) + .listEvents(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1505,11 +1491,10 @@ public Mono> pingWithResponseAsync(String resourceGroup if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.ping(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - resourceGroupName, registryName, webhookName, accept, context)) + .withContext(context -> service.ping(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, webhookName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1546,11 +1531,10 @@ private Mono> pingWithResponseAsync(String resourceGrou if (webhookName == null) { return Mono.error(new IllegalArgumentException("Parameter webhookName is required and cannot be null.")); } - final String apiVersion = "2025-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.ping(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, - registryName, webhookName, accept, context); + return service.ping(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, webhookName, accept, context); } /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolListResult.java index 14bbce22749a..4107648b7cf5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolListResult.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolUpdateParameters.java index cbed20caf2ee..cbe990e89f3d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentPoolUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentProperties.java index 31a4efec656f..8f03d158e8b5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AgentProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Architecture.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Architecture.java index 355b94c90478..8657b341064f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Architecture.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Architecture.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Argument.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Argument.java index 54f7f0e77ce3..8f3da1c02891 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Argument.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Argument.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfo.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfo.java index 839ae00deab9..d6c8981b21c6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfo.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfo.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfoUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfoUpdateParameters.java index 6409c4258e69..6d675bb90138 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfoUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/AuthInfoUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependency.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependency.java index 0c4f167a6010..4794ad58d6c6 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependency.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependency.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependencyType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependencyType.java index caff5828a7c7..cb3f35ef5bf5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependencyType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageDependencyType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTrigger.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTrigger.java index 6b1f08d2b26b..b2a74bb6efc0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTrigger.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTrigger.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerType.java index 7835bfd6b417..6a0382ec8375 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerUpdateParameters.java index 143009302885..33502da767ce 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/BaseImageTriggerUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Credentials.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Credentials.java index 0caa77244764..7acf9d084c58 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Credentials.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Credentials.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CustomRegistryCredentials.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CustomRegistryCredentials.java index 1ffc32fa49ff..7f88a9dc49a0 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CustomRegistryCredentials.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/CustomRegistryCredentials.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildRequest.java index 028c8e5e1070..26ffaea2d80e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildRequest.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildStepUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildStepUpdateParameters.java index 489d63b375ee..e817bdebdf45 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildStepUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerBuildStepUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerTaskStep.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerTaskStep.java index 82c7597c7d53..42e466797215 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerTaskStep.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/DockerTaskStep.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskRunRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskRunRequest.java index b93b182027eb..728bccb2cafc 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskRunRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskRunRequest.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStep.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStep.java index c57f84c4c215..823d88f11226 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStep.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStep.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStepUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStepUpdateParameters.java index 1735b36c3bfe..3910a695c096 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStepUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/EncodedTaskStepUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskRunRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskRunRequest.java index c4f674dd6c22..874228fab75e 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskRunRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskRunRequest.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStep.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStep.java index f76be756e7d5..b302ab026da4 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStep.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStep.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStepUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStepUpdateParameters.java index 126929f33f1c..5d81161720ee 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStepUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/FileTaskStepUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageDescriptor.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageDescriptor.java index 4af508238fa3..a673ae1a7514 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageDescriptor.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageDescriptor.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageUpdateTrigger.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageUpdateTrigger.java index 6952e8baf084..0c7f6662360a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageUpdateTrigger.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ImageUpdateTrigger.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OS.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OS.java index 117afd982c55..097cefdafecc 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OS.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OS.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OverrideTaskStepProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OverrideTaskStepProperties.java index 3d5fce015606..0c934cc38018 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OverrideTaskStepProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/OverrideTaskStepProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformProperties.java index 3f0632037ab9..7a6a0e369464 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformUpdateParameters.java index 436b1e2926dc..99bfe5a926b5 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/PlatformUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java index 74f0938cfd6f..40132038f31f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/ProvisioningState.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The provisioning state of this agent pool. + * The provisioning state of the archive at the time the operation was called. */ public final class ProvisioningState extends ExpandableStringEnum { /** diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunListResult.java index af303c2cf5ae..2f15dc8bb79f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunListResult.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunRequest.java index d247c4287417..32665aae20d2 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunRequest.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunStatus.java index eb9ba6ebd9dd..0a2fc5f6a8d4 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunStatus.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunType.java index cbf89cc2e557..2941d9b0be1d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunUpdateParameters.java index 0c26e97f3ef7..b862890d4373 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/RunUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObject.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObject.java index 2f8b600b45fa..70746ee31170 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObject.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObject.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObjectType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObjectType.java index f9de3d6b2aaf..0e842ca2c662 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObjectType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SecretObjectType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SetValue.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SetValue.java index 57ca268c4bd2..a914920c98a2 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SetValue.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SetValue.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceControlType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceControlType.java index 26cecaceff66..994295b43ae9 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceControlType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceControlType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceProperties.java index bcaa43e55180..24409f759c33 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryCredentials.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryCredentials.java index 90964849843a..df35808ccd5c 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryCredentials.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryCredentials.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryLoginMode.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryLoginMode.java index 7d3ca9763175..66c1f73daf33 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryLoginMode.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceRegistryLoginMode.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTrigger.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTrigger.java index 30270c2eeb84..3c349c434d66 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTrigger.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTrigger.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerDescriptor.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerDescriptor.java index 2389279af88e..c708bc286ee3 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerDescriptor.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerDescriptor.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerEvent.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerEvent.java index e6f646a699a2..dc549410e0f1 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerEvent.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerEvent.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerUpdateParameters.java index 45df39764d69..4742540eb20d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceTriggerUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceUpdateParameters.java index 50959928987f..d3dea4d3299b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/SourceUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StepType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StepType.java index 3088931e1924..dec63129e57b 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StepType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/StepType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskListResult.java index 8380dd92e846..146fc8e7f326 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskListResult.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunListResult.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunListResult.java index 3caadb30ec4b..f90416951f16 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunListResult.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunListResult.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunRequest.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunRequest.java index 928c43db429b..c8a19a3d291d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunRequest.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunRequest.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunUpdateParameters.java index 269b12a197c3..558835cbfd79 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskRunUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStatus.java index 8326919b7bf4..91a46f163100 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStatus.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepProperties.java index 3799b9be1c3d..ffa87d1b9d11 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepUpdateParameters.java index ca371564c789..1cbbb744d514 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskStepUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskUpdateParameters.java index 02f5e594f9e8..8a6584deb6d2 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TaskUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTrigger.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTrigger.java index ca43440a93cf..4aa43aea7338 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTrigger.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTrigger.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerDescriptor.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerDescriptor.java index 62355aba68ba..af635bf26061 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerDescriptor.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerDescriptor.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerUpdateParameters.java index 2d2db7dd256a..448639311e5d 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TimerTriggerUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenType.java index ddf50c557f4e..9f8345b2a650 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TokenType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerProperties.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerProperties.java index 387ebd950c56..b0369e3a2a52 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerProperties.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerProperties.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java index 9ea52ea90d99..da23d272d08a 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerStatus.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerUpdateParameters.java index fbc0b88997f0..c906a9e6cf45 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerUpdateParameters.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/TriggerUpdateParameters.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UpdateTriggerPayloadType.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UpdateTriggerPayloadType.java index e3d5fed362a5..d902bf0d5a07 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UpdateTriggerPayloadType.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/UpdateTriggerPayloadType.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Variant.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Variant.java index 5b63690fd1f8..0f2b02295d2f 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Variant.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/models/Variant.java @@ -1,6 +1,5 @@ // 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; diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry/proxy-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry/proxy-config.json index a0b8e920e049..4bcc116332bd 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry/proxy-config.json +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerregistry/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerregistry.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerregistry.implementation.CacheRulesClientImpl$CacheRulesService"],["com.azure.resourcemanager.containerregistry.implementation.ConnectedRegistriesClientImpl$ConnectedRegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.CredentialSetsClientImpl$CredentialSetsService"],["com.azure.resourcemanager.containerregistry.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerregistry.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerregistry.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.ReplicationsClientImpl$ReplicationsService"],["com.azure.resourcemanager.containerregistry.implementation.RunsClientImpl$RunsService"],["com.azure.resourcemanager.containerregistry.implementation.ScopeMapsClientImpl$ScopeMapsService"],["com.azure.resourcemanager.containerregistry.implementation.TaskRunsClientImpl$TaskRunsService"],["com.azure.resourcemanager.containerregistry.implementation.TasksClientImpl$TasksService"],["com.azure.resourcemanager.containerregistry.implementation.TokensClientImpl$TokensService"],["com.azure.resourcemanager.containerregistry.implementation.WebhooksClientImpl$WebhooksService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerregistry.implementation.CacheRulesClientImpl$CacheRulesService"],["com.azure.resourcemanager.containerregistry.implementation.ConnectedRegistriesClientImpl$ConnectedRegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.CredentialSetsClientImpl$CredentialSetsService"],["com.azure.resourcemanager.containerregistry.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerregistry.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerregistry.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.containerregistry.implementation.ReplicationsClientImpl$ReplicationsService"],["com.azure.resourcemanager.containerregistry.implementation.ScopeMapsClientImpl$ScopeMapsService"],["com.azure.resourcemanager.containerregistry.implementation.TokensClientImpl$TokensService"],["com.azure.resourcemanager.containerregistry.implementation.WebhooksClientImpl$WebhooksService"]] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/proxy-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/proxy-config.json new file mode 100644 index 000000000000..b056823a26c0 --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/proxy-config.json @@ -0,0 +1 @@ +[["com.azure.resourcemanager.containerregistry.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerregistry.implementation.RegistryTasksClientImpl$RegistryTasksService"],["com.azure.resourcemanager.containerregistry.implementation.RunsClientImpl$RunsService"],["com.azure.resourcemanager.containerregistry.implementation.TaskRunsClientImpl$TaskRunsService"],["com.azure.resourcemanager.containerregistry.implementation.TasksClientImpl$TasksService"]] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/reflect-config.json b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/reflect-config.json new file mode 100644 index 000000000000..0637a088a01e --- /dev/null +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/main/resources/META-INF/native-image/com.azure.resourcemanager/containerregistry_registrytasks/reflect-config.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTaskTests.java b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTaskTests.java index a948c2abcf85..a24d0d396ee8 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTaskTests.java +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/src/test/java/com/azure/resourcemanager/containerregistry/RegistryTaskTests.java @@ -1063,7 +1063,7 @@ public void cancelAndDeleteRunsAndTasks() { Assertions.assertTrue(registryManager.registryTaskRuns().listByRegistry(rgName, acrName).stream().count() == 1); // cancelling the run we just created - registryManager.serviceClient().getRuns().cancel(rgName, acrName, registryTaskRun.runId()); + registryManager.taskClient().getRuns().cancel(rgName, acrName, registryTaskRun.runId()); boolean notCanceled = true; while (notCanceled) { diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index a8cf8499f518..f71a57eafabb 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -60,6 +60,13 @@ "package": "com.azure.resourcemanager.containerregistry", "args": "--tag=package-2025-11 --modelerfour.lenient-model-deduplication=true --enable-sync-stack=false" }, + "containerregistrytasks": { + "dir": "../containerregistry/azure-resourcemanager-containerregistry", + "source": "specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/readme.md", + "package": "com.azure.resourcemanager.containerregistry", + "args": "--tag=package-2019-06-preview --title=ContainerRegistryTasksManagementClient --rename-operation-group:Registries:RegistryTasks --rename-model=DockerBuildStep:DockerTaskStep --modelerfour.lenient-model-deduplication=true --metadata-suffix=registrytasks --enable-sync-stack=false", + "note": "Use commit 09695f5a97dfcf201766ea2f2e7e3b53aec49144 for Swagger before TypeSpec migration" + }, "containerregistry-hybrid": { "dir": "../resourcemanagerhybrid/azure-resourcemanager-containerregistry", "source": "specification/containerregistry/resource-manager/readme.md", 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 deleted file mode 100644 index 5bd0598f3928..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsCreateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// 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.AgentPoolInner; -import com.azure.resourcemanager.containerregistry.models.OS; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for AgentPools Create. - */ -public final class AgentPoolsCreateSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/AgentPoolsCreate.json - */ - /** - * Sample code: AgentPools_Create. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void agentPoolsCreate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getAgentPools() - .create("myResourceGroup", "myRegistry", "myAgentPool", - new AgentPoolInner().withLocation("WESTUS") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withCount(1) - .withTier("S1") - .withOs(OS.LINUX), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index 4653c799e546..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 AgentPools Delete. - */ -public final class AgentPoolsDeleteSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/AgentPoolsDelete.json - */ - /** - * Sample code: AgentPools_Delete. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void agentPoolsDelete(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getAgentPools() - .delete("myResourceGroup", "myRegistry", "myAgentPool", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 3b2da9466dea..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetQueueStatusSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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 AgentPools GetQueueStatus. - */ -public final class AgentPoolsGetQueueStatusSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/AgentPoolsGetQueueStatus.json - */ - /** - * Sample code: AgentPools_GetQueueStatus. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void agentPoolsGetQueueStatus(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getAgentPools() - .getQueueStatusWithResponse("myResourceGroup", "myRegistry", "myAgentPool", - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index db9d74a75d3b..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 AgentPools Get. - */ -public final class AgentPoolsGetSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/AgentPoolsGet.json - */ - /** - * Sample code: AgentPools_Get. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void agentPoolsGet(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getAgentPools() - .getWithResponse("myResourceGroup", "myRegistry", "myAgentPool", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 38265047f179..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsListSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 AgentPools List. - */ -public final class AgentPoolsListSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/AgentPoolsList.json - */ - /** - * Sample code: AgentPools_List. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void agentPoolsList(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getAgentPools() - .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 6afcbe47db6c..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/AgentPoolsUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.AgentPoolUpdateParameters; - -/** - * Samples for AgentPools Update. - */ -public final class AgentPoolsUpdateSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/AgentPoolsUpdate.json - */ - /** - * Sample code: AgentPools_Update. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void agentPoolsUpdate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getAgentPools() - .update("myResourceGroup", "myRegistry", "myAgentPool", new AgentPoolUpdateParameters().withCount(1), - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 7c43347fb415..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesGetBuildSourceUploadUrlSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 Registries GetBuildSourceUploadUrl. - */ -public final class RegistriesGetBuildSourceUploadUrlSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesGetBuildSourceUploadUrl.json - */ - /** - * Sample code: Registries_GetBuildSourceUploadUrl. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void registriesGetBuildSourceUploadUrl(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .getBuildSourceUploadUrlWithResponse("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index ada79dc90a6f..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RegistriesScheduleRunSamples.java +++ /dev/null @@ -1,261 +0,0 @@ -// 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.AgentProperties; -import com.azure.resourcemanager.containerregistry.models.Architecture; -import com.azure.resourcemanager.containerregistry.models.Argument; -import com.azure.resourcemanager.containerregistry.models.Credentials; -import com.azure.resourcemanager.containerregistry.models.CustomRegistryCredentials; -import com.azure.resourcemanager.containerregistry.models.DockerBuildRequest; -import com.azure.resourcemanager.containerregistry.models.EncodedTaskRunRequest; -import com.azure.resourcemanager.containerregistry.models.FileTaskRunRequest; -import com.azure.resourcemanager.containerregistry.models.OS; -import com.azure.resourcemanager.containerregistry.models.OverrideTaskStepProperties; -import com.azure.resourcemanager.containerregistry.models.PlatformProperties; -import com.azure.resourcemanager.containerregistry.models.SecretObject; -import com.azure.resourcemanager.containerregistry.models.SecretObjectType; -import com.azure.resourcemanager.containerregistry.models.SetValue; -import com.azure.resourcemanager.containerregistry.models.SourceRegistryCredentials; -import com.azure.resourcemanager.containerregistry.models.SourceRegistryLoginMode; -import com.azure.resourcemanager.containerregistry.models.TaskRunRequest; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries ScheduleRun. - */ -public final class RegistriesScheduleRunSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesScheduleRun_FileTaskRun.json - */ - /** - * Sample code: Registries_ScheduleRun_FileTaskRun. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void registriesScheduleRunFileTaskRun(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .scheduleRun("myResourceGroup", "myRegistry", new FileTaskRunRequest().withTaskFilePath("acb.yaml") - .withValuesFilePath("prod-values.yaml") - .withValues(Arrays.asList( - new SetValue().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new SetValue().withName("mysecrettestargument").withValue("mysecrettestvalue").withIsSecret(true))) - .withPlatform(new PlatformProperties().withOs(OS.LINUX)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withSourceLocation( - "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesScheduleRun.json - */ - /** - * Sample code: Registries_ScheduleRun. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void registriesScheduleRun(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .scheduleRun("myResourceGroup", "myRegistry", new DockerBuildRequest().withIsArchiveEnabled(true) - .withImageNames(Arrays.asList("azurerest:testtag")) - .withIsPushEnabled(true) - .withNoCache(true) - .withDockerFilePath("DockerFile") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument").withValue("mysecrettestvalue").withIsSecret(true))) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withSourceLocation( - "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesScheduleRun_EncodedTaskRun.json - */ - /** - * Sample code: Registries_ScheduleRun_EncodedTaskRun. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void registriesScheduleRunEncodedTaskRun(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .scheduleRun("myResourceGroup", "myRegistry", new EncodedTaskRunRequest() - .withEncodedTaskContent("fakeTokenPlaceholder") - .withEncodedValuesContent("fakeTokenPlaceholder") - .withValues(Arrays.asList( - new SetValue().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new SetValue().withName("mysecrettestargument").withValue("mysecrettestvalue").withIsSecret(true))) - .withPlatform(new PlatformProperties().withOs(OS.LINUX)) - .withAgentConfiguration(new AgentProperties().withCpu(2)), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesScheduleRun_WithCustomCredentials.json - */ - /** - * Sample code: Registries_ScheduleRun_WithCustomCredentials. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - registriesScheduleRunWithCustomCredentials(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .scheduleRun("myResourceGroup", "myRegistry", new DockerBuildRequest().withIsArchiveEnabled(true) - .withImageNames(Arrays.asList("azurerest:testtag")) - .withIsPushEnabled(true) - .withNoCache(true) - .withDockerFilePath("DockerFile") - .withTarget("stage1") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument").withValue("mysecrettestvalue").withIsSecret(true))) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withSourceLocation( - "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D") - .withCredentials(new Credentials() - .withSourceRegistry(new SourceRegistryCredentials().withLoginMode(SourceRegistryLoginMode.DEFAULT)) - .withCustomRegistries(mapOf("myregistry.azurecr.io", - new CustomRegistryCredentials() - .withUsername(new SecretObject().withValue("reg1").withType(SecretObjectType.OPAQUE)) - .withPassword(new SecretObject().withValue("***").withType(SecretObjectType.OPAQUE)), - "myregistry2.azurecr.io", - new CustomRegistryCredentials() - .withUsername(new SecretObject().withValue("reg2").withType(SecretObjectType.OPAQUE)) - .withPassword(new SecretObject().withValue("***").withType(SecretObjectType.OPAQUE))))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesScheduleRun_WithLogTemplate.json - */ - /** - * Sample code: Registries_ScheduleRun_WithLogTemplate. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void registriesScheduleRunWithLogTemplate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .scheduleRun("myResourceGroup", "myRegistry", new DockerBuildRequest().withIsArchiveEnabled(true) - .withLogTemplate("acr/tasks:{{.Run.OS}}") - .withImageNames(Arrays.asList("azurerest:testtag")) - .withIsPushEnabled(true) - .withNoCache(true) - .withDockerFilePath("DockerFile") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument").withValue("mysecrettestvalue").withIsSecret(true))) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withSourceLocation( - "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesScheduleRun_Task.json - */ - /** - * Sample code: Registries_ScheduleRun_Task. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void registriesScheduleRunTask(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .scheduleRun("myResourceGroup", "myRegistry", - new TaskRunRequest().withTaskId("myTask") - .withOverrideTaskStepProperties(new OverrideTaskStepProperties().withFile("overriddenDockerfile") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument") - .withValue("mysecrettestvalue") - .withIsSecret(true))) - .withTarget("build") - .withValues(Arrays.asList( - new SetValue().withName("mytestname").withValue("mytestvalue").withIsSecret(false), - new SetValue().withName("mysecrettestname") - .withValue("mysecrettestvalue") - .withIsSecret(true))) - .withUpdateTriggerToken("fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json - */ - /** - * Sample code: Registries_ScheduleRun_Task_WithCustomCredentials. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - registriesScheduleRunTaskWithCustomCredentials(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRegistries() - .scheduleRun("myResourceGroup", "myRegistry", new FileTaskRunRequest().withTaskFilePath("acb.yaml") - .withValues(Arrays.asList( - new SetValue().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new SetValue().withName("mysecrettestargument").withValue("mysecrettestvalue").withIsSecret(true))) - .withPlatform(new PlatformProperties().withOs(OS.LINUX)) - .withCredentials(new Credentials() - .withSourceRegistry(new SourceRegistryCredentials().withLoginMode(SourceRegistryLoginMode.DEFAULT)) - .withCustomRegistries(mapOf("myregistry.azurecr.io", - new CustomRegistryCredentials() - .withUsername(new SecretObject().withValue("reg1").withType(SecretObjectType.OPAQUE)) - .withPassword(new SecretObject().withValue("***").withType(SecretObjectType.OPAQUE))))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index f5df32e3d256..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsCancelSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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 Runs Cancel. - */ -public final class RunsCancelSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RunsCancel.json - */ - /** - * Sample code: Runs_Cancel. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void runsCancel(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRuns() - .cancel("myResourceGroup", "myRegistry", "0accec26-d6de-4757-8e74-d080f38eaaab", - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 89bcc1f99d94..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetLogSasUrlSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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 Runs GetLogSasUrl. - */ -public final class RunsGetLogSasUrlSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RunsGetLogSasUrl.json - */ - /** - * Sample code: Runs_GetLogSasUrl. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void runsGetLogSasUrl(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRuns() - .getLogSasUrlWithResponse("myResourceGroup", "myRegistry", "0accec26-d6de-4757-8e74-d080f38eaaab", - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 744111be1063..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsGetSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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 Runs Get. - */ -public final class RunsGetSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RunsGet.json - */ - /** - * Sample code: Runs_Get. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void runsGet(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRuns() - .getWithResponse("myResourceGroup", "myRegistry", "0accec26-d6de-4757-8e74-d080f38eaaab", - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 072b46aeffe2..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsListSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 Runs List. - */ -public final class RunsListSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RunsList.json - */ - /** - * Sample code: Runs_List. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void runsList(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRuns() - .list("myResourceGroup", "myRegistry", "", 10, com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 45d02386ffde..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/RunsUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.RunUpdateParameters; - -/** - * Samples for Runs Update. - */ -public final class RunsUpdateSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/RunsUpdate.json - */ - /** - * Sample code: Runs_Update. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void runsUpdate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getRuns() - .update("myResourceGroup", "myRegistry", "0accec26-d6de-4757-8e74-d080f38eaaab", - new RunUpdateParameters().withIsArchiveEnabled(true), com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 9cd0df37051e..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsCreateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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.TaskRunInner; -import com.azure.resourcemanager.containerregistry.models.Architecture; -import com.azure.resourcemanager.containerregistry.models.Credentials; -import com.azure.resourcemanager.containerregistry.models.EncodedTaskRunRequest; -import com.azure.resourcemanager.containerregistry.models.OS; -import com.azure.resourcemanager.containerregistry.models.PlatformProperties; -import java.util.Arrays; - -/** - * Samples for TaskRuns Create. - */ -public final class TaskRunsCreateSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TaskRunsCreate.json - */ - /** - * Sample code: TaskRuns_Create. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void taskRunsCreate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTaskRuns() - .create("myResourceGroup", "myRegistry", "myRun", - new TaskRunInner() - .withRunRequest(new EncodedTaskRunRequest().withEncodedTaskContent("fakeTokenPlaceholder") - .withEncodedValuesContent("fakeTokenPlaceholder") - .withValues(Arrays.asList()) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withCredentials(new Credentials())) - .withForceUpdateTag("test"), - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 0b86aa39d1c6..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 TaskRuns Delete. - */ -public final class TaskRunsDeleteSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TaskRunsDelete.json - */ - /** - * Sample code: TaskRuns_Delete. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void taskRunsDelete(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTaskRuns() - .delete("myResourceGroup", "myRegistry", "myRun", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 3e119ef243a2..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetDetailsSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 TaskRuns GetDetails. - */ -public final class TaskRunsGetDetailsSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TaskRunsGetDetails.json - */ - /** - * Sample code: TaskRuns_GetDetails. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void taskRunsGetDetails(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTaskRuns() - .getDetailsWithResponse("myResourceGroup", "myRegistry", "myRun", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 8ad7cb58bad4..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 TaskRuns Get. - */ -public final class TaskRunsGetSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TaskRunsGet.json - */ - /** - * Sample code: TaskRuns_Get. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void taskRunsGet(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTaskRuns() - .getWithResponse("myResourceGroup", "myRegistry", "myRun", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 0435b14aa691..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsListSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 TaskRuns List. - */ -public final class TaskRunsListSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TaskRunsList.json - */ - /** - * Sample code: TaskRuns_List. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void taskRunsList(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTaskRuns() - .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index f03f581124b5..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TaskRunsUpdateSamples.java +++ /dev/null @@ -1,43 +0,0 @@ -// 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.Architecture; -import com.azure.resourcemanager.containerregistry.models.Credentials; -import com.azure.resourcemanager.containerregistry.models.EncodedTaskRunRequest; -import com.azure.resourcemanager.containerregistry.models.OS; -import com.azure.resourcemanager.containerregistry.models.PlatformProperties; -import com.azure.resourcemanager.containerregistry.models.TaskRunUpdateParameters; -import java.util.Arrays; - -/** - * Samples for TaskRuns Update. - */ -public final class TaskRunsUpdateSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TaskRunsUpdate.json - */ - /** - * Sample code: TaskRuns_Update. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void taskRunsUpdate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTaskRuns() - .update("myResourceGroup", "myRegistry", "myRun", - new TaskRunUpdateParameters().withRunRequest(new EncodedTaskRunRequest().withIsArchiveEnabled(true) - .withEncodedTaskContent("fakeTokenPlaceholder") - .withEncodedValuesContent("fakeTokenPlaceholder") - .withValues(Arrays.asList()) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withCredentials(new Credentials())).withForceUpdateTag("test"), - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 19f4ea81643b..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksCreateSamples.java +++ /dev/null @@ -1,294 +0,0 @@ -// 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.TaskInner; -import com.azure.resourcemanager.containerregistry.models.AgentProperties; -import com.azure.resourcemanager.containerregistry.models.Architecture; -import com.azure.resourcemanager.containerregistry.models.Argument; -import com.azure.resourcemanager.containerregistry.models.AuthInfo; -import com.azure.resourcemanager.containerregistry.models.BaseImageTrigger; -import com.azure.resourcemanager.containerregistry.models.BaseImageTriggerType; -import com.azure.resourcemanager.containerregistry.models.DockerTaskStep; -import com.azure.resourcemanager.containerregistry.models.IdentityProperties; -import com.azure.resourcemanager.containerregistry.models.OS; -import com.azure.resourcemanager.containerregistry.models.PlatformProperties; -import com.azure.resourcemanager.containerregistry.models.ResourceIdentityType; -import com.azure.resourcemanager.containerregistry.models.SourceControlType; -import com.azure.resourcemanager.containerregistry.models.SourceProperties; -import com.azure.resourcemanager.containerregistry.models.SourceTrigger; -import com.azure.resourcemanager.containerregistry.models.SourceTriggerEvent; -import com.azure.resourcemanager.containerregistry.models.TaskStatus; -import com.azure.resourcemanager.containerregistry.models.TimerTrigger; -import com.azure.resourcemanager.containerregistry.models.TokenType; -import com.azure.resourcemanager.containerregistry.models.TriggerProperties; -import com.azure.resourcemanager.containerregistry.models.UpdateTriggerPayloadType; -import com.azure.resourcemanager.containerregistry.models.UserIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Tasks Create. - */ -public final class TasksCreateSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json - */ - /** - * Sample code: Tasks_Create_WithUserIdentities_WithSystemIdentity. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void - tasksCreateWithUserIdentitiesWithSystemIdentity(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .create("myResourceGroup", "myRegistry", "mytTask", - new TaskInner().withLocation("eastus") - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withStatus(TaskStatus.ENABLED) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withStep(new DockerTaskStep().withContextPath("src") - .withImageNames(Arrays.asList("azurerest:testtag")) - .withIsPushEnabled(true) - .withNoCache(false) - .withDockerFilePath("src/DockerFile") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument") - .withValue("mysecrettestvalue") - .withIsSecret(true)))) - .withTrigger( - new TriggerProperties() - .withTimerTriggers(Arrays - .asList(new TimerTrigger().withSchedule("30 9 * * 1-5").withName("myTimerTrigger"))) - .withSourceTriggers(Arrays.asList(new SourceTrigger() - .withSourceRepository( - new SourceProperties().withSourceControlType(SourceControlType.GITHUB) - .withRepositoryUrl("https://github.com/Azure/azure-rest-api-specs") - .withBranch("master") - .withSourceControlAuthProperties(new AuthInfo().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger"))) - .withBaseImageTrigger( - new BaseImageTrigger().withBaseImageTriggerType(BaseImageTriggerType.RUNTIME) - .withName("myBaseImageTrigger"))) - .withIsSystemTask(false), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksCreate.json - */ - /** - * Sample code: Tasks_Create. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksCreate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .create("myResourceGroup", "myRegistry", "mytTask", - new TaskInner().withLocation("eastus") - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withStatus(TaskStatus.ENABLED) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withStep(new DockerTaskStep().withContextPath("src") - .withImageNames(Arrays.asList("azurerest:testtag")) - .withIsPushEnabled(true) - .withNoCache(false) - .withDockerFilePath("src/DockerFile") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument") - .withValue("mysecrettestvalue") - .withIsSecret(true)))) - .withTrigger( - new TriggerProperties() - .withTimerTriggers(Arrays - .asList(new TimerTrigger().withSchedule("30 9 * * 1-5").withName("myTimerTrigger"))) - .withSourceTriggers(Arrays.asList(new SourceTrigger() - .withSourceRepository( - new SourceProperties().withSourceControlType(SourceControlType.GITHUB) - .withRepositoryUrl("https://github.com/Azure/azure-rest-api-specs") - .withBranch("master") - .withSourceControlAuthProperties(new AuthInfo().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger"))) - .withBaseImageTrigger( - new BaseImageTrigger().withBaseImageTriggerType(BaseImageTriggerType.RUNTIME) - .withUpdateTriggerEndpoint("https://user:pass@mycicd.webhook.com?token=foo") - .withUpdateTriggerPayloadType(UpdateTriggerPayloadType.TOKEN) - .withName("myBaseImageTrigger"))) - .withLogTemplate("acr/tasks:{{.Run.OS}}") - .withIsSystemTask(false), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json - */ - /** - * Sample code: Tasks_Create_WithSystemAndUserIdentities. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksCreateWithSystemAndUserIdentities(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .create("myResourceGroup", "myRegistry", "mytTask", new TaskInner().withLocation("eastus") - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withIdentity(new IdentityProperties().withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2", - new UserIdentityProperties()))) - .withStatus(TaskStatus.ENABLED) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withStep(new DockerTaskStep().withContextPath("src") - .withImageNames(Arrays.asList("azurerest:testtag")) - .withIsPushEnabled(true) - .withNoCache(false) - .withDockerFilePath("src/DockerFile") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument") - .withValue("mysecrettestvalue") - .withIsSecret(true)))) - .withTrigger( - new TriggerProperties() - .withTimerTriggers( - Arrays.asList(new TimerTrigger().withSchedule("30 9 * * 1-5").withName("myTimerTrigger"))) - .withSourceTriggers( - Arrays.asList(new SourceTrigger() - .withSourceRepository( - new SourceProperties().withSourceControlType(SourceControlType.GITHUB) - .withRepositoryUrl("https://github.com/Azure/azure-rest-api-specs") - .withBranch("master") - .withSourceControlAuthProperties(new AuthInfo().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger"))) - .withBaseImageTrigger( - new BaseImageTrigger().withBaseImageTriggerType(BaseImageTriggerType.RUNTIME) - .withUpdateTriggerEndpoint("https://user:pass@mycicd.webhook.com?token=foo") - .withUpdateTriggerPayloadType(UpdateTriggerPayloadType.DEFAULT) - .withName("myBaseImageTrigger"))) - .withIsSystemTask(false), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json - */ - /** - * Sample code: Tasks_Create_WithUserIdentities. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksCreateWithUserIdentities(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .create("myResourceGroup", "myRegistry", "mytTask", new TaskInner().withLocation("eastus") - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withIdentity(new IdentityProperties().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", - new UserIdentityProperties(), - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2", - new UserIdentityProperties()))) - .withStatus(TaskStatus.ENABLED) - .withPlatform(new PlatformProperties().withOs(OS.LINUX).withArchitecture(Architecture.AMD64)) - .withAgentConfiguration(new AgentProperties().withCpu(2)) - .withStep(new DockerTaskStep().withContextPath("src") - .withImageNames(Arrays.asList("azurerest:testtag")) - .withIsPushEnabled(true) - .withNoCache(false) - .withDockerFilePath("src/DockerFile") - .withArguments(Arrays.asList( - new Argument().withName("mytestargument").withValue("mytestvalue").withIsSecret(false), - new Argument().withName("mysecrettestargument") - .withValue("mysecrettestvalue") - .withIsSecret(true)))) - .withTrigger( - new TriggerProperties() - .withTimerTriggers( - Arrays.asList(new TimerTrigger().withSchedule("30 9 * * 1-5").withName("myTimerTrigger"))) - .withSourceTriggers( - Arrays.asList(new SourceTrigger() - .withSourceRepository( - new SourceProperties().withSourceControlType(SourceControlType.GITHUB) - .withRepositoryUrl("https://github.com/Azure/azure-rest-api-specs") - .withBranch("master") - .withSourceControlAuthProperties(new AuthInfo().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger"))) - .withBaseImageTrigger( - new BaseImageTrigger().withBaseImageTriggerType(BaseImageTriggerType.RUNTIME) - .withUpdateTriggerEndpoint("https://user:pass@mycicd.webhook.com?token=foo") - .withUpdateTriggerPayloadType(UpdateTriggerPayloadType.DEFAULT) - .withName("myBaseImageTrigger"))) - .withIsSystemTask(false), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksCreate_QuickTask.json - */ - /** - * Sample code: Tasks_Create_QuickTask. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksCreateQuickTask(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .create("myResourceGroup", "myRegistry", "quicktask", - new TaskInner().withLocation("eastus") - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withStatus(TaskStatus.ENABLED) - .withLogTemplate("acr/tasks:{{.Run.OS}}") - .withIsSystemTask(true), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index d3cc36c484f9..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 Tasks Delete. - */ -public final class TasksDeleteSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksDelete.json - */ - /** - * Sample code: Tasks_Delete. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksDelete(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .delete("myResourceGroup", "myRegistry", "myTask", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 9ca46b952813..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetDetailsSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 Tasks GetDetails. - */ -public final class TasksGetDetailsSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksGetDetails.json - */ - /** - * Sample code: Tasks_GetDetails. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksGetDetails(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .getDetailsWithResponse("myResourceGroup", "myRegistry", "myTask", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index f89c59da7498..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 Tasks Get. - */ -public final class TasksGetSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksGet.json - */ - /** - * Sample code: Tasks_Get. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksGet(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .getWithResponse("myResourceGroup", "myRegistry", "myTask", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 3245408aec8a..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksListSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 Tasks List. - */ -public final class TasksListSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksList.json - */ - /** - * Sample code: Tasks_List. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksList(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .list("myResourceGroup", "myRegistry", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 7fff27d5b31c..000000000000 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerregistry/generated/TasksUpdateSamples.java +++ /dev/null @@ -1,208 +0,0 @@ -// 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.AgentProperties; -import com.azure.resourcemanager.containerregistry.models.AuthInfoUpdateParameters; -import com.azure.resourcemanager.containerregistry.models.Credentials; -import com.azure.resourcemanager.containerregistry.models.CustomRegistryCredentials; -import com.azure.resourcemanager.containerregistry.models.DockerBuildStepUpdateParameters; -import com.azure.resourcemanager.containerregistry.models.SecretObject; -import com.azure.resourcemanager.containerregistry.models.SecretObjectType; -import com.azure.resourcemanager.containerregistry.models.SourceTriggerEvent; -import com.azure.resourcemanager.containerregistry.models.SourceTriggerUpdateParameters; -import com.azure.resourcemanager.containerregistry.models.SourceUpdateParameters; -import com.azure.resourcemanager.containerregistry.models.TaskStatus; -import com.azure.resourcemanager.containerregistry.models.TaskUpdateParameters; -import com.azure.resourcemanager.containerregistry.models.TokenType; -import com.azure.resourcemanager.containerregistry.models.TriggerUpdateParameters; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Tasks Update. - */ -public final class TasksUpdateSamples { - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksUpdate_QuickTask.json - */ - /** - * Sample code: Tasks_Update_QuickTask. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksUpdateQuickTask(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .update("myResourceGroup", "myRegistry", "quicktask", - new TaskUpdateParameters().withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withStatus(TaskStatus.ENABLED) - .withLogTemplate("acr/tasks:{{.Run.OS}}"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json - */ - /** - * Sample code: Tasks_Update_WithMSICustomCredentials. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksUpdateWithMSICustomCredentials(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .update("myResourceGroup", "myRegistry", "myTask", new TaskUpdateParameters() - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withStatus(TaskStatus.ENABLED) - .withAgentConfiguration(new AgentProperties().withCpu(3)) - .withStep(new DockerBuildStepUpdateParameters().withImageNames(Arrays.asList("azurerest:testtag1")) - .withDockerFilePath("src/DockerFile")) - .withTrigger( - new TriggerUpdateParameters().withSourceTriggers(Arrays.asList(new SourceTriggerUpdateParameters() - .withSourceRepository(new SourceUpdateParameters() - .withSourceControlAuthProperties(new AuthInfoUpdateParameters().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger")))) - .withCredentials(new Credentials().withCustomRegistries( - mapOf("myregistry.azurecr.io", new CustomRegistryCredentials().withIdentity("[system]")))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json - */ - /** - * Sample code: Tasks_Update_WithKeyVaultCustomCredentials. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksUpdateWithKeyVaultCustomCredentials(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .update("myResourceGroup", "myRegistry", "myTask", new TaskUpdateParameters() - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withStatus(TaskStatus.ENABLED) - .withAgentConfiguration(new AgentProperties().withCpu(3)) - .withStep(new DockerBuildStepUpdateParameters().withImageNames(Arrays.asList("azurerest:testtag1")) - .withDockerFilePath("src/DockerFile")) - .withTrigger( - new TriggerUpdateParameters().withSourceTriggers(Arrays.asList(new SourceTriggerUpdateParameters() - .withSourceRepository(new SourceUpdateParameters() - .withSourceControlAuthProperties(new AuthInfoUpdateParameters().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger")))) - .withCredentials(new Credentials().withCustomRegistries(mapOf("myregistry.azurecr.io", - new CustomRegistryCredentials() - .withUsername( - new SecretObject().withValue("https://myacbvault.vault.azure.net/secrets/username") - .withType(SecretObjectType.VAULTSECRET)) - .withPassword( - new SecretObject().withValue("https://myacbvault.vault.azure.net/secrets/password") - .withType(SecretObjectType.VAULTSECRET)) - .withIdentity("[system]")))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksUpdate.json - */ - /** - * Sample code: Tasks_Update. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksUpdate(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .update("myResourceGroup", "myRegistry", "myTask", new TaskUpdateParameters() - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withStatus(TaskStatus.ENABLED) - .withAgentConfiguration(new AgentProperties().withCpu(3)) - .withStep(new DockerBuildStepUpdateParameters().withImageNames(Arrays.asList("azurerest:testtag1")) - .withDockerFilePath("src/DockerFile")) - .withTrigger( - new TriggerUpdateParameters().withSourceTriggers(Arrays.asList(new SourceTriggerUpdateParameters() - .withSourceRepository(new SourceUpdateParameters() - .withSourceControlAuthProperties(new AuthInfoUpdateParameters().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger")))) - .withCredentials(new Credentials().withCustomRegistries(mapOf("myregistry.azurecr.io", - new CustomRegistryCredentials() - .withUsername(new SecretObject().withValue("username").withType(SecretObjectType.OPAQUE)) - .withPassword( - new SecretObject().withValue("https://myacbvault.vault.azure.net/secrets/password") - .withType(SecretObjectType.VAULTSECRET)) - .withIdentity("[system]")))) - .withLogTemplate("acr/tasks:{{.Run.OS}}"), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01- - * preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json - */ - /** - * Sample code: Tasks_Update_WithOpaqueCustomCredentials. - * - * @param azure The entry point for accessing resource management APIs in Azure. - */ - public static void tasksUpdateWithOpaqueCustomCredentials(com.azure.resourcemanager.AzureResourceManager azure) { - azure.containerRegistries() - .manager() - .serviceClient() - .getTasks() - .update("myResourceGroup", "myRegistry", "myTask", new TaskUpdateParameters() - .withTags(mapOf("testkey", "fakeTokenPlaceholder")) - .withStatus(TaskStatus.ENABLED) - .withAgentConfiguration(new AgentProperties().withCpu(3)) - .withStep(new DockerBuildStepUpdateParameters().withImageNames(Arrays.asList("azurerest:testtag1")) - .withDockerFilePath("src/DockerFile")) - .withTrigger( - new TriggerUpdateParameters().withSourceTriggers(Arrays.asList(new SourceTriggerUpdateParameters() - .withSourceRepository(new SourceUpdateParameters() - .withSourceControlAuthProperties(new AuthInfoUpdateParameters().withTokenType(TokenType.PAT) - .withToken("fakeTokenPlaceholder"))) - .withSourceTriggerEvents(Arrays.asList(SourceTriggerEvent.COMMIT)) - .withName("mySourceTrigger")))) - .withCredentials(new Credentials().withCustomRegistries(mapOf("myregistry.azurecr.io", - new CustomRegistryCredentials() - .withUsername(new SecretObject().withValue("username").withType(SecretObjectType.OPAQUE)) - .withPassword(new SecretObject().withValue("***").withType(SecretObjectType.OPAQUE))))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -}