scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of Container Registry Tasks service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Container Registry Tasks service API instance.
+ */
+ public ContainerRegistryTasksManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.containerregistry.tasks")
+ .append("/")
+ .append(clientVersion);
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new ContainerRegistryTasksManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of AgentPools. It manages AgentPool.
+ *
+ * @return Resource collection API of AgentPools.
+ */
+ public AgentPools agentPools() {
+ if (this.agentPools == null) {
+ this.agentPools = new AgentPoolsImpl(clientObject.getAgentPools(), this);
+ }
+ return agentPools;
+ }
+
+ /**
+ * Gets the resource collection API of Runs.
+ *
+ * @return Resource collection API of Runs.
+ */
+ public Runs runs() {
+ if (this.runs == null) {
+ this.runs = new RunsImpl(clientObject.getRuns(), this);
+ }
+ return runs;
+ }
+
+ /**
+ * Gets the resource collection API of TaskRuns. It manages TaskRun.
+ *
+ * @return Resource collection API of TaskRuns.
+ */
+ public TaskRuns taskRuns() {
+ if (this.taskRuns == null) {
+ this.taskRuns = new TaskRunsImpl(clientObject.getTaskRuns(), this);
+ }
+ return taskRuns;
+ }
+
+ /**
+ * Gets the resource collection API of Tasks. It manages Task.
+ *
+ * @return Resource collection API of Tasks.
+ */
+ public Tasks tasks() {
+ if (this.tasks == null) {
+ this.tasks = new TasksImpl(clientObject.getTasks(), this);
+ }
+ return tasks;
+ }
+
+ /**
+ * Gets the resource collection API of Registries.
+ *
+ * @return Resource collection API of Registries.
+ */
+ public Registries registries() {
+ if (this.registries == null) {
+ this.registries = new RegistriesImpl(clientObject.getRegistries(), this);
+ }
+ return registries;
+ }
+
+ /**
+ * Gets wrapped service client ContainerRegistryTasksManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client ContainerRegistryTasksManagementClient.
+ */
+ public ContainerRegistryTasksManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/AgentPoolsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/AgentPoolsClient.java
new file mode 100644
index 000000000000..4cd60dda3429
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/AgentPoolsClient.java
@@ -0,0 +1,305 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolQueueStatusInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolUpdateParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in AgentPoolsClient.
+ */
+public interface AgentPoolsClient {
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 detailed information for a given agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ Context context);
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 detailed information for a given agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentPoolInner get(String resourceGroupName, String registryName, String agentPoolName);
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AgentPoolInner> beginCreate(String resourceGroupName, String registryName,
+ String agentPoolName, AgentPoolInner agentPool);
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AgentPoolInner> beginCreate(String resourceGroupName, String registryName,
+ String agentPoolName, AgentPoolInner agentPool, Context context);
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentPoolInner create(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolInner agentPool);
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentPoolInner create(String resourceGroupName, String registryName, String agentPoolName, AgentPoolInner agentPool,
+ Context context);
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, String registryName,
+ String agentPoolName, AgentPoolUpdateParameters updateParameters);
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, String registryName,
+ String agentPoolName, AgentPoolUpdateParameters updateParameters, Context context);
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentPoolInner update(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolUpdateParameters updateParameters);
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentPoolInner update(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolUpdateParameters updateParameters, Context context);
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String agentPoolName);
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String agentPoolName,
+ Context context);
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String registryName, String agentPoolName);
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String registryName, String agentPoolName, Context context);
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName);
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName, Context context);
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 count of queued runs for a given agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getQueueStatusWithResponse(String resourceGroupName, String registryName,
+ String agentPoolName, Context context);
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 count of queued runs for a given agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentPoolQueueStatusInner getQueueStatus(String resourceGroupName, String registryName, String agentPoolName);
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/ContainerRegistryTasksManagementClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/ContainerRegistryTasksManagementClient.java
new file mode 100644
index 000000000000..3c0af73fdc9d
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/ContainerRegistryTasksManagementClient.java
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for ContainerRegistryTasksManagementClient class.
+ */
+public interface ContainerRegistryTasksManagementClient {
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the AgentPoolsClient object to access its operations.
+ *
+ * @return the AgentPoolsClient object.
+ */
+ AgentPoolsClient getAgentPools();
+
+ /**
+ * Gets the RunsClient object to access its operations.
+ *
+ * @return the RunsClient object.
+ */
+ RunsClient getRuns();
+
+ /**
+ * Gets the TaskRunsClient object to access its operations.
+ *
+ * @return the TaskRunsClient object.
+ */
+ TaskRunsClient getTaskRuns();
+
+ /**
+ * Gets the TasksClient object to access its operations.
+ *
+ * @return the TasksClient object.
+ */
+ TasksClient getTasks();
+
+ /**
+ * Gets the RegistriesClient object to access its operations.
+ *
+ * @return the RegistriesClient object.
+ */
+ RegistriesClient getRegistries();
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/RegistriesClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/RegistriesClient.java
new file mode 100644
index 000000000000..d147760baaaa
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/RegistriesClient.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.SourceUploadDefinitionInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in RegistriesClient.
+ */
+public interface RegistriesClient {
+ /**
+ * Schedules a new run based on the request parameters and add it to the run queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param runRequest The request body.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response scheduleRunWithResponse(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. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param runRequest The request body.
+ * @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);
+
+ /**
+ * Get the upload location for the user to be able to upload the source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/RunsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/RunsClient.java
new file mode 100644
index 000000000000..c15957c493b8
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/RunsClient.java
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunGetLogResultInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunUpdateParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in RunsClient.
+ */
+public interface RunsClient {
+ /**
+ * Gets the detailed information for a given run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 detailed information for a given run along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String registryName, String runId, Context context);
+
+ /**
+ * Gets the detailed information for a given run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 detailed information for a given run.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RunInner get(String resourceGroupName, String registryName, String runId);
+
+ /**
+ * Patch the run properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @param runUpdateParameters The run update properties.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String registryName, String runId,
+ RunUpdateParameters runUpdateParameters, Context context);
+
+ /**
+ * Patch the run properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @param runUpdateParameters The run update properties.
+ * @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 update(String resourceGroupName, String registryName, String runId,
+ RunUpdateParameters runUpdateParameters);
+
+ /**
+ * Gets all the runs for a registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 all the runs for a registry as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName);
+
+ /**
+ * Gets all the runs for a registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param filter The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed
+ * string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed.
+ * @param top $top is supported for get list of runs, which limits the maximum number of runs to return.
+ * @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 all the runs for a registry as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName, String filter, Integer top,
+ Context context);
+
+ /**
+ * Gets a link to download the run logs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 a link to download the run logs along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getLogSasUrlWithResponse(String resourceGroupName, String registryName, String runId,
+ Context context);
+
+ /**
+ * Gets a link to download the run logs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a link to download the run logs.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RunGetLogResultInner getLogSasUrl(String resourceGroupName, String registryName, String runId);
+
+ /**
+ * Cancel an existing run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response cancelWithResponse(String resourceGroupName, String registryName, String runId, Context context);
+
+ /**
+ * Cancel an existing run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cancel(String resourceGroupName, String registryName, String runId);
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/TaskRunsClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/TaskRunsClient.java
new file mode 100644
index 000000000000..64eb8f42933d
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/TaskRunsClient.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.TaskRunInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.TaskRunUpdateParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in TaskRunsClient.
+ */
+public interface TaskRunsClient {
+ /**
+ * Gets the detailed information for a given task run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @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 detailed information for a given task run along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String registryName, String taskRunName,
+ Context context);
+
+ /**
+ * Gets the detailed information for a given task run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @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 detailed information for a given task run.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskRunInner get(String resourceGroupName, String registryName, String taskRunName);
+
+ /**
+ * Creates a task run for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param taskRun 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 the task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskRunInner> beginCreate(String resourceGroupName, String registryName,
+ String taskRunName, TaskRunInner taskRun);
+
+ /**
+ * Creates a task run for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param taskRun 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 the task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskRunInner> beginCreate(String resourceGroupName, String registryName,
+ String taskRunName, TaskRunInner taskRun, Context context);
+
+ /**
+ * Creates a task run for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param taskRun 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 task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskRunInner create(String resourceGroupName, String registryName, String taskRunName, TaskRunInner taskRun);
+
+ /**
+ * Creates a task run for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param taskRun 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 task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskRunInner create(String resourceGroupName, String registryName, String taskRunName, TaskRunInner taskRun,
+ Context context);
+
+ /**
+ * Updates a task run with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param updateParameters The parameters for updating a task run.
+ * @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 the task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskRunInner> beginUpdate(String resourceGroupName, String registryName,
+ String taskRunName, TaskRunUpdateParameters updateParameters);
+
+ /**
+ * Updates a task run with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param updateParameters The parameters for updating a task run.
+ * @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 the task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskRunInner> beginUpdate(String resourceGroupName, String registryName,
+ String taskRunName, TaskRunUpdateParameters updateParameters, Context context);
+
+ /**
+ * Updates a task run with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param updateParameters The parameters for updating a task run.
+ * @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 task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskRunInner update(String resourceGroupName, String registryName, String taskRunName,
+ TaskRunUpdateParameters updateParameters);
+
+ /**
+ * Updates a task run with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @param updateParameters The parameters for updating a task run.
+ * @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 task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskRunInner update(String resourceGroupName, String registryName, String taskRunName,
+ TaskRunUpdateParameters updateParameters, Context context);
+
+ /**
+ * Deletes a specified task run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String registryName, String taskRunName,
+ Context context);
+
+ /**
+ * Deletes a specified task run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String registryName, String taskRunName);
+
+ /**
+ * Lists all the task runs for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of task runs as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName);
+
+ /**
+ * Lists all the task runs for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of task runs as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName, Context context);
+
+ /**
+ * Gets the detailed information for a given task run that includes all secrets.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @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 detailed information for a given task run that includes all secrets along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDetailsWithResponse(String resourceGroupName, String registryName, String taskRunName,
+ Context context);
+
+ /**
+ * Gets the detailed information for a given task run that includes all secrets.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskRunName The name of the task run.
+ * @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 detailed information for a given task run that includes all secrets.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskRunInner getDetails(String resourceGroupName, String registryName, String taskRunName);
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/TasksClient.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/TasksClient.java
new file mode 100644
index 000000000000..bd885fde97ce
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/TasksClient.java
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.TaskInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.TaskUpdateParameters;
+
+/**
+ * An instance of this class provides access to all the operations defined in TasksClient.
+ */
+public interface TasksClient {
+ /**
+ * Get the properties of a specified task.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of a specified task along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String registryName, String taskName,
+ Context context);
+
+ /**
+ * Get the properties of a specified task.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of a specified task.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskInner get(String resourceGroupName, String registryName, String taskName);
+
+ /**
+ * Creates a task for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @param taskCreateParameters The parameters for creating a task.
+ * @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 task that has the ARM resource and task properties.
+ * The task will have all information to schedule a run against it along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(String resourceGroupName, String registryName, String taskName,
+ TaskInner taskCreateParameters, Context context);
+
+ /**
+ * Creates a task for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @param taskCreateParameters The parameters for creating a task.
+ * @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 task that has the ARM resource and task properties.
+ * The task will have all information to schedule a run against it.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskInner create(String resourceGroupName, String registryName, String taskName, TaskInner taskCreateParameters);
+
+ /**
+ * Updates a task with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @param taskUpdateParameters The parameters for updating a task.
+ * @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 task that has the ARM resource and task properties.
+ * The task will have all information to schedule a run against it along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String registryName, String taskName,
+ TaskUpdateParameters taskUpdateParameters, Context context);
+
+ /**
+ * Updates a task with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @param taskUpdateParameters The parameters for updating a task.
+ * @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 task that has the ARM resource and task properties.
+ * The task will have all information to schedule a run against it.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskInner update(String resourceGroupName, String registryName, String taskName,
+ TaskUpdateParameters taskUpdateParameters);
+
+ /**
+ * Deletes a specified task.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String registryName, String taskName, Context context);
+
+ /**
+ * Deletes a specified task.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String registryName, String taskName);
+
+ /**
+ * Lists all the tasks for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of tasks as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName);
+
+ /**
+ * Lists all the tasks for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of tasks as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String registryName, Context context);
+
+ /**
+ * Returns a task with extended information that includes all secrets.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @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 task that has the ARM resource and task properties.
+ * The task will have all information to schedule a run against it along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDetailsWithResponse(String resourceGroupName, String registryName, String taskName,
+ Context context);
+
+ /**
+ * Returns a task with extended information that includes all secrets.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param taskName The name of the container registry task.
+ * @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 task that has the ARM resource and task properties.
+ * The task will have all information to schedule a run against it.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskInner getDetails(String resourceGroupName, String registryName, String taskName);
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolInner.java
new file mode 100644
index 000000000000..0cdd63ac68e8
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolInner.java
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+@Fluent
+public final class AgentPoolInner extends Resource {
+ /*
+ * The properties associated with the agent pool
+ */
+ private AgentPoolProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of AgentPoolInner class.
+ */
+ public AgentPoolInner() {
+ }
+
+ /**
+ * Get the properties property: The properties associated with the agent pool.
+ *
+ * @return the properties value.
+ */
+ public AgentPoolProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties associated with the agent pool.
+ *
+ * @param properties the properties value to set.
+ * @return the AgentPoolInner object itself.
+ */
+ public AgentPoolInner withProperties(AgentPoolProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public AgentPoolInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public AgentPoolInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AgentPoolInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AgentPoolInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AgentPoolInner.
+ */
+ public static AgentPoolInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AgentPoolInner deserializedAgentPoolInner = new AgentPoolInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAgentPoolInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAgentPoolInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAgentPoolInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedAgentPoolInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedAgentPoolInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedAgentPoolInner.properties = AgentPoolProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAgentPoolInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAgentPoolInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolPropertiesUpdateParameters.java
new file mode 100644
index 000000000000..79f4cb18da43
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolPropertiesUpdateParameters.java
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The AgentPoolPropertiesUpdateParameters model.
+ */
+@Fluent
+public final class AgentPoolPropertiesUpdateParameters
+ implements JsonSerializable {
+ /*
+ * The count of agent machine
+ */
+ private Integer count;
+
+ /**
+ * Creates an instance of AgentPoolPropertiesUpdateParameters class.
+ */
+ public AgentPoolPropertiesUpdateParameters() {
+ }
+
+ /**
+ * Get the count property: The count of agent machine.
+ *
+ * @return the count value.
+ */
+ public Integer count() {
+ return this.count;
+ }
+
+ /**
+ * Set the count property: The count of agent machine.
+ *
+ * @param count the count value to set.
+ * @return the AgentPoolPropertiesUpdateParameters object itself.
+ */
+ public AgentPoolPropertiesUpdateParameters withCount(Integer count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("count", this.count);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AgentPoolPropertiesUpdateParameters from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AgentPoolPropertiesUpdateParameters if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AgentPoolPropertiesUpdateParameters.
+ */
+ public static AgentPoolPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AgentPoolPropertiesUpdateParameters deserializedAgentPoolPropertiesUpdateParameters
+ = new AgentPoolPropertiesUpdateParameters();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("count".equals(fieldName)) {
+ deserializedAgentPoolPropertiesUpdateParameters.count = reader.getNullable(JsonReader::getInt);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAgentPoolPropertiesUpdateParameters;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolQueueStatusInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolQueueStatusInner.java
new file mode 100644
index 000000000000..5ded7b2ebf40
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/AgentPoolQueueStatusInner.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The QueueStatus of Agent Pool.
+ */
+@Immutable
+public final class AgentPoolQueueStatusInner implements JsonSerializable {
+ /*
+ * The number of pending runs in the queue
+ */
+ private Integer count;
+
+ /**
+ * Creates an instance of AgentPoolQueueStatusInner class.
+ */
+ private AgentPoolQueueStatusInner() {
+ }
+
+ /**
+ * Get the count property: The number of pending runs in the queue.
+ *
+ * @return the count value.
+ */
+ public Integer count() {
+ return this.count;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("count", this.count);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AgentPoolQueueStatusInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AgentPoolQueueStatusInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AgentPoolQueueStatusInner.
+ */
+ public static AgentPoolQueueStatusInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AgentPoolQueueStatusInner deserializedAgentPoolQueueStatusInner = new AgentPoolQueueStatusInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("count".equals(fieldName)) {
+ deserializedAgentPoolQueueStatusInner.count = reader.getNullable(JsonReader::getInt);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAgentPoolQueueStatusInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/RunGetLogResultInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/RunGetLogResultInner.java
new file mode 100644
index 000000000000..8e94f1fe8e20
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/RunGetLogResultInner.java
@@ -0,0 +1,91 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The result of get log link operation.
+ */
+@Immutable
+public final class RunGetLogResultInner implements JsonSerializable {
+ /*
+ * The link to logs for a run on a azure container registry.
+ */
+ private String logLink;
+
+ /*
+ * The link to logs in registry for a run on a azure container registry.
+ */
+ private String logArtifactLink;
+
+ /**
+ * Creates an instance of RunGetLogResultInner class.
+ */
+ private RunGetLogResultInner() {
+ }
+
+ /**
+ * Get the logLink property: The link to logs for a run on a azure container registry.
+ *
+ * @return the logLink value.
+ */
+ public String logLink() {
+ return this.logLink;
+ }
+
+ /**
+ * Get the logArtifactLink property: The link to logs in registry for a run on a azure container registry.
+ *
+ * @return the logArtifactLink value.
+ */
+ public String logArtifactLink() {
+ return this.logArtifactLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("logLink", this.logLink);
+ jsonWriter.writeStringField("logArtifactLink", this.logArtifactLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RunGetLogResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RunGetLogResultInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the RunGetLogResultInner.
+ */
+ public static RunGetLogResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RunGetLogResultInner deserializedRunGetLogResultInner = new RunGetLogResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("logLink".equals(fieldName)) {
+ deserializedRunGetLogResultInner.logLink = reader.getString();
+ } else if ("logArtifactLink".equals(fieldName)) {
+ deserializedRunGetLogResultInner.logArtifactLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRunGetLogResultInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/RunInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/RunInner.java
new file mode 100644
index 000000000000..43ceacbfada2
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/RunInner.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunProperties;
+import java.io.IOException;
+
+/**
+ * Run resource properties.
+ */
+@Immutable
+public final class RunInner extends ProxyResource {
+ /*
+ * The properties of a run.
+ */
+ private RunProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of RunInner class.
+ */
+ private RunInner() {
+ }
+
+ /**
+ * Get the properties property: The properties of a run.
+ *
+ * @return the properties value.
+ */
+ public RunProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RunInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RunInner if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the RunInner.
+ */
+ public static RunInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RunInner deserializedRunInner = new RunInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedRunInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedRunInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedRunInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedRunInner.properties = RunProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedRunInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRunInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/SourceUploadDefinitionInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/SourceUploadDefinitionInner.java
new file mode 100644
index 000000000000..e82ecb09b5af
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/SourceUploadDefinitionInner.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The properties of a response to source upload request.
+ */
+@Immutable
+public final class SourceUploadDefinitionInner implements JsonSerializable {
+ /*
+ * The URL where the client can upload the source.
+ */
+ private String uploadUrl;
+
+ /*
+ * The relative path to the source. This is used to submit the subsequent queue build request.
+ */
+ private String relativePath;
+
+ /**
+ * Creates an instance of SourceUploadDefinitionInner class.
+ */
+ private SourceUploadDefinitionInner() {
+ }
+
+ /**
+ * Get the uploadUrl property: The URL where the client can upload the source.
+ *
+ * @return the uploadUrl value.
+ */
+ public String uploadUrl() {
+ return this.uploadUrl;
+ }
+
+ /**
+ * Get the relativePath property: The relative path to the source. This is used to submit the subsequent queue build
+ * request.
+ *
+ * @return the relativePath value.
+ */
+ public String relativePath() {
+ return this.relativePath;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("uploadUrl", this.uploadUrl);
+ jsonWriter.writeStringField("relativePath", this.relativePath);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SourceUploadDefinitionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SourceUploadDefinitionInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the SourceUploadDefinitionInner.
+ */
+ public static SourceUploadDefinitionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SourceUploadDefinitionInner deserializedSourceUploadDefinitionInner = new SourceUploadDefinitionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("uploadUrl".equals(fieldName)) {
+ deserializedSourceUploadDefinitionInner.uploadUrl = reader.getString();
+ } else if ("relativePath".equals(fieldName)) {
+ deserializedSourceUploadDefinitionInner.relativePath = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSourceUploadDefinitionInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskInner.java
new file mode 100644
index 000000000000..da8c8c2f75c3
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskInner.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.containerregistry.tasks.models.IdentityProperties;
+import com.azure.resourcemanager.containerregistry.tasks.models.TaskProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The task that has the ARM resource and task properties.
+ * The task will have all information to schedule a run against it.
+ */
+@Fluent
+public final class TaskInner extends Resource {
+ /*
+ * The properties of a task.
+ */
+ private TaskProperties properties;
+
+ /*
+ * Identity for the resource.
+ */
+ private IdentityProperties identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of TaskInner class.
+ */
+ public TaskInner() {
+ }
+
+ /**
+ * Get the properties property: The properties of a task.
+ *
+ * @return the properties value.
+ */
+ public TaskProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties of a task.
+ *
+ * @param properties the properties value to set.
+ * @return the TaskInner object itself.
+ */
+ public TaskInner withProperties(TaskProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Identity for the resource.
+ *
+ * @return the identity value.
+ */
+ public IdentityProperties identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Identity for the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the TaskInner object itself.
+ */
+ public TaskInner withIdentity(IdentityProperties identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public TaskInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public TaskInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TaskInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TaskInner if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the TaskInner.
+ */
+ public static TaskInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TaskInner deserializedTaskInner = new TaskInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedTaskInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedTaskInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedTaskInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedTaskInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedTaskInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedTaskInner.properties = TaskProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedTaskInner.identity = IdentityProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTaskInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTaskInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskPropertiesUpdateParameters.java
new file mode 100644
index 000000000000..206c14612702
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskPropertiesUpdateParameters.java
@@ -0,0 +1,320 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentProperties;
+import com.azure.resourcemanager.containerregistry.tasks.models.Credentials;
+import com.azure.resourcemanager.containerregistry.tasks.models.PlatformUpdateParameters;
+import com.azure.resourcemanager.containerregistry.tasks.models.TaskStatus;
+import com.azure.resourcemanager.containerregistry.tasks.models.TaskStepUpdateParameters;
+import com.azure.resourcemanager.containerregistry.tasks.models.TriggerUpdateParameters;
+import java.io.IOException;
+
+/**
+ * The properties for updating a task.
+ */
+@Fluent
+public final class TaskPropertiesUpdateParameters implements JsonSerializable {
+ /*
+ * The current status of task.
+ */
+ private TaskStatus status;
+
+ /*
+ * The platform properties against which the run has to happen.
+ */
+ private PlatformUpdateParameters platform;
+
+ /*
+ * The machine configuration of the run agent.
+ */
+ private AgentProperties agentConfiguration;
+
+ /*
+ * The dedicated agent pool for the task.
+ */
+ private String agentPoolName;
+
+ /*
+ * Run timeout in seconds.
+ */
+ private Integer timeout;
+
+ /*
+ * The properties for updating a task step.
+ */
+ private TaskStepUpdateParameters step;
+
+ /*
+ * The properties for updating trigger properties.
+ */
+ private TriggerUpdateParameters trigger;
+
+ /*
+ * The parameters that describes a set of credentials that will be used when this run is invoked.
+ */
+ private Credentials credentials;
+
+ /*
+ * The template that describes the repository and tag information for run log artifact.
+ */
+ private String logTemplate;
+
+ /**
+ * Creates an instance of TaskPropertiesUpdateParameters class.
+ */
+ public TaskPropertiesUpdateParameters() {
+ }
+
+ /**
+ * Get the status property: The current status of task.
+ *
+ * @return the status value.
+ */
+ public TaskStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The current status of task.
+ *
+ * @param status the status value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withStatus(TaskStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the platform property: The platform properties against which the run has to happen.
+ *
+ * @return the platform value.
+ */
+ public PlatformUpdateParameters platform() {
+ return this.platform;
+ }
+
+ /**
+ * Set the platform property: The platform properties against which the run has to happen.
+ *
+ * @param platform the platform value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withPlatform(PlatformUpdateParameters platform) {
+ this.platform = platform;
+ return this;
+ }
+
+ /**
+ * Get the agentConfiguration property: The machine configuration of the run agent.
+ *
+ * @return the agentConfiguration value.
+ */
+ public AgentProperties agentConfiguration() {
+ return this.agentConfiguration;
+ }
+
+ /**
+ * Set the agentConfiguration property: The machine configuration of the run agent.
+ *
+ * @param agentConfiguration the agentConfiguration value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withAgentConfiguration(AgentProperties agentConfiguration) {
+ this.agentConfiguration = agentConfiguration;
+ return this;
+ }
+
+ /**
+ * Get the agentPoolName property: The dedicated agent pool for the task.
+ *
+ * @return the agentPoolName value.
+ */
+ public String agentPoolName() {
+ return this.agentPoolName;
+ }
+
+ /**
+ * Set the agentPoolName property: The dedicated agent pool for the task.
+ *
+ * @param agentPoolName the agentPoolName value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withAgentPoolName(String agentPoolName) {
+ this.agentPoolName = agentPoolName;
+ return this;
+ }
+
+ /**
+ * Get the timeout property: Run timeout in seconds.
+ *
+ * @return the timeout value.
+ */
+ public Integer timeout() {
+ return this.timeout;
+ }
+
+ /**
+ * Set the timeout property: Run timeout in seconds.
+ *
+ * @param timeout the timeout value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withTimeout(Integer timeout) {
+ this.timeout = timeout;
+ return this;
+ }
+
+ /**
+ * Get the step property: The properties for updating a task step.
+ *
+ * @return the step value.
+ */
+ public TaskStepUpdateParameters step() {
+ return this.step;
+ }
+
+ /**
+ * Set the step property: The properties for updating a task step.
+ *
+ * @param step the step value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withStep(TaskStepUpdateParameters step) {
+ this.step = step;
+ return this;
+ }
+
+ /**
+ * Get the trigger property: The properties for updating trigger properties.
+ *
+ * @return the trigger value.
+ */
+ public TriggerUpdateParameters trigger() {
+ return this.trigger;
+ }
+
+ /**
+ * Set the trigger property: The properties for updating trigger properties.
+ *
+ * @param trigger the trigger value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withTrigger(TriggerUpdateParameters trigger) {
+ this.trigger = trigger;
+ return this;
+ }
+
+ /**
+ * Get the credentials property: The parameters that describes a set of credentials that will be used when this run
+ * is invoked.
+ *
+ * @return the credentials value.
+ */
+ public Credentials credentials() {
+ return this.credentials;
+ }
+
+ /**
+ * Set the credentials property: The parameters that describes a set of credentials that will be used when this run
+ * is invoked.
+ *
+ * @param credentials the credentials value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withCredentials(Credentials credentials) {
+ this.credentials = credentials;
+ return this;
+ }
+
+ /**
+ * Get the logTemplate property: The template that describes the repository and tag information for run log
+ * artifact.
+ *
+ * @return the logTemplate value.
+ */
+ public String logTemplate() {
+ return this.logTemplate;
+ }
+
+ /**
+ * Set the logTemplate property: The template that describes the repository and tag information for run log
+ * artifact.
+ *
+ * @param logTemplate the logTemplate value to set.
+ * @return the TaskPropertiesUpdateParameters object itself.
+ */
+ public TaskPropertiesUpdateParameters withLogTemplate(String logTemplate) {
+ this.logTemplate = logTemplate;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
+ jsonWriter.writeJsonField("platform", this.platform);
+ jsonWriter.writeJsonField("agentConfiguration", this.agentConfiguration);
+ jsonWriter.writeStringField("agentPoolName", this.agentPoolName);
+ jsonWriter.writeNumberField("timeout", this.timeout);
+ jsonWriter.writeJsonField("step", this.step);
+ jsonWriter.writeJsonField("trigger", this.trigger);
+ jsonWriter.writeJsonField("credentials", this.credentials);
+ jsonWriter.writeStringField("logTemplate", this.logTemplate);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TaskPropertiesUpdateParameters from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TaskPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the TaskPropertiesUpdateParameters.
+ */
+ public static TaskPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TaskPropertiesUpdateParameters deserializedTaskPropertiesUpdateParameters
+ = new TaskPropertiesUpdateParameters();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.status = TaskStatus.fromString(reader.getString());
+ } else if ("platform".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.platform = PlatformUpdateParameters.fromJson(reader);
+ } else if ("agentConfiguration".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.agentConfiguration = AgentProperties.fromJson(reader);
+ } else if ("agentPoolName".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.agentPoolName = reader.getString();
+ } else if ("timeout".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.timeout = reader.getNullable(JsonReader::getInt);
+ } else if ("step".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.step = TaskStepUpdateParameters.fromJson(reader);
+ } else if ("trigger".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.trigger = TriggerUpdateParameters.fromJson(reader);
+ } else if ("credentials".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.credentials = Credentials.fromJson(reader);
+ } else if ("logTemplate".equals(fieldName)) {
+ deserializedTaskPropertiesUpdateParameters.logTemplate = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTaskPropertiesUpdateParameters;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunInner.java
new file mode 100644
index 000000000000..ced3eb368e7d
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunInner.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.containerregistry.tasks.models.IdentityProperties;
+import java.io.IOException;
+
+/**
+ * The task run that has the ARM resource and properties.
+ * The task run will have the information of request and result of a run.
+ */
+@Fluent
+public final class TaskRunInner extends ProxyResource {
+ /*
+ * The properties associated with the task run, i.e., request and result of the run
+ */
+ private TaskRunPropertiesInner properties;
+
+ /*
+ * Identity for the resource.
+ */
+ private IdentityProperties identity;
+
+ /*
+ * The location of the resource
+ */
+ private String location;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of TaskRunInner class.
+ */
+ public TaskRunInner() {
+ }
+
+ /**
+ * Get the properties property: The properties associated with the task run, i.e., request and result of the run.
+ *
+ * @return the properties value.
+ */
+ public TaskRunPropertiesInner properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties associated with the task run, i.e., request and result of the run.
+ *
+ * @param properties the properties value to set.
+ * @return the TaskRunInner object itself.
+ */
+ public TaskRunInner withProperties(TaskRunPropertiesInner properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Identity for the resource.
+ *
+ * @return the identity value.
+ */
+ public IdentityProperties identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Identity for the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the TaskRunInner object itself.
+ */
+ public TaskRunInner withIdentity(IdentityProperties identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location of the resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the resource.
+ *
+ * @param location the location value to set.
+ * @return the TaskRunInner object itself.
+ */
+ public TaskRunInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeStringField("location", this.location);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TaskRunInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TaskRunInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the TaskRunInner.
+ */
+ public static TaskRunInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TaskRunInner deserializedTaskRunInner = new TaskRunInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedTaskRunInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedTaskRunInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedTaskRunInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedTaskRunInner.properties = TaskRunPropertiesInner.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedTaskRunInner.identity = IdentityProperties.fromJson(reader);
+ } else if ("location".equals(fieldName)) {
+ deserializedTaskRunInner.location = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTaskRunInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTaskRunInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunPropertiesInner.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunPropertiesInner.java
new file mode 100644
index 000000000000..aa744265e93a
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunPropertiesInner.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.containerregistry.tasks.models.ProvisioningState;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunRequest;
+import java.io.IOException;
+
+/**
+ * The properties of task run.
+ */
+@Fluent
+public final class TaskRunPropertiesInner implements JsonSerializable {
+ /*
+ * The provisioning state of this task run
+ */
+ private ProvisioningState provisioningState;
+
+ /*
+ * The request (parameters) for the run
+ */
+ private RunRequest runRequest;
+
+ /*
+ * The result of this task run
+ */
+ private RunInner runResult;
+
+ /*
+ * How the run should be forced to rerun even if the run request configuration has not changed
+ */
+ private String forceUpdateTag;
+
+ /**
+ * Creates an instance of TaskRunPropertiesInner class.
+ */
+ public TaskRunPropertiesInner() {
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this task run.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the runRequest property: The request (parameters) for the run.
+ *
+ * @return the runRequest value.
+ */
+ public RunRequest runRequest() {
+ return this.runRequest;
+ }
+
+ /**
+ * Set the runRequest property: The request (parameters) for the run.
+ *
+ * @param runRequest the runRequest value to set.
+ * @return the TaskRunPropertiesInner object itself.
+ */
+ public TaskRunPropertiesInner withRunRequest(RunRequest runRequest) {
+ this.runRequest = runRequest;
+ return this;
+ }
+
+ /**
+ * Get the runResult property: The result of this task run.
+ *
+ * @return the runResult value.
+ */
+ public RunInner runResult() {
+ return this.runResult;
+ }
+
+ /**
+ * Get the forceUpdateTag property: How the run should be forced to rerun even if the run request configuration has
+ * not changed.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.forceUpdateTag;
+ }
+
+ /**
+ * Set the forceUpdateTag property: How the run should be forced to rerun even if the run request configuration has
+ * not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the TaskRunPropertiesInner object itself.
+ */
+ public TaskRunPropertiesInner withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("runRequest", this.runRequest);
+ jsonWriter.writeStringField("forceUpdateTag", this.forceUpdateTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TaskRunPropertiesInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TaskRunPropertiesInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the TaskRunPropertiesInner.
+ */
+ public static TaskRunPropertiesInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TaskRunPropertiesInner deserializedTaskRunPropertiesInner = new TaskRunPropertiesInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("provisioningState".equals(fieldName)) {
+ deserializedTaskRunPropertiesInner.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else if ("runRequest".equals(fieldName)) {
+ deserializedTaskRunPropertiesInner.runRequest = RunRequest.fromJson(reader);
+ } else if ("runResult".equals(fieldName)) {
+ deserializedTaskRunPropertiesInner.runResult = RunInner.fromJson(reader);
+ } else if ("forceUpdateTag".equals(fieldName)) {
+ deserializedTaskRunPropertiesInner.forceUpdateTag = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTaskRunPropertiesInner;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunPropertiesUpdateParameters.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunPropertiesUpdateParameters.java
new file mode 100644
index 000000000000..ad2ffa71cb8b
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/TaskRunPropertiesUpdateParameters.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunRequest;
+import java.io.IOException;
+
+/**
+ * The properties of a task run update parameters.
+ */
+@Fluent
+public final class TaskRunPropertiesUpdateParameters implements JsonSerializable {
+ /*
+ * The request (parameters) for the new run
+ */
+ private RunRequest runRequest;
+
+ /*
+ * How the run should be forced to rerun even if the run request configuration has not changed
+ */
+ private String forceUpdateTag;
+
+ /**
+ * Creates an instance of TaskRunPropertiesUpdateParameters class.
+ */
+ public TaskRunPropertiesUpdateParameters() {
+ }
+
+ /**
+ * Get the runRequest property: The request (parameters) for the new run.
+ *
+ * @return the runRequest value.
+ */
+ public RunRequest runRequest() {
+ return this.runRequest;
+ }
+
+ /**
+ * Set the runRequest property: The request (parameters) for the new run.
+ *
+ * @param runRequest the runRequest value to set.
+ * @return the TaskRunPropertiesUpdateParameters object itself.
+ */
+ public TaskRunPropertiesUpdateParameters withRunRequest(RunRequest runRequest) {
+ this.runRequest = runRequest;
+ return this;
+ }
+
+ /**
+ * Get the forceUpdateTag property: How the run should be forced to rerun even if the run request configuration has
+ * not changed.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.forceUpdateTag;
+ }
+
+ /**
+ * Set the forceUpdateTag property: How the run should be forced to rerun even if the run request configuration has
+ * not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the TaskRunPropertiesUpdateParameters object itself.
+ */
+ public TaskRunPropertiesUpdateParameters withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("runRequest", this.runRequest);
+ jsonWriter.writeStringField("forceUpdateTag", this.forceUpdateTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TaskRunPropertiesUpdateParameters from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TaskRunPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the TaskRunPropertiesUpdateParameters.
+ */
+ public static TaskRunPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TaskRunPropertiesUpdateParameters deserializedTaskRunPropertiesUpdateParameters
+ = new TaskRunPropertiesUpdateParameters();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("runRequest".equals(fieldName)) {
+ deserializedTaskRunPropertiesUpdateParameters.runRequest = RunRequest.fromJson(reader);
+ } else if ("forceUpdateTag".equals(fieldName)) {
+ deserializedTaskRunPropertiesUpdateParameters.forceUpdateTag = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTaskRunPropertiesUpdateParameters;
+ });
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/package-info.java
new file mode 100644
index 000000000000..4fd445a8b0d1
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/models/package-info.java
@@ -0,0 +1,11 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for ContainerRegistryTasks.
+ * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for
+ * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry
+ * components.
+ */
+package com.azure.resourcemanager.containerregistry.tasks.fluent.models;
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/package-info.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/package-info.java
new file mode 100644
index 000000000000..b08462cb2d13
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/fluent/package-info.java
@@ -0,0 +1,11 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for ContainerRegistryTasks.
+ * The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for
+ * Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry
+ * components.
+ */
+package com.azure.resourcemanager.containerregistry.tasks.fluent;
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolImpl.java
new file mode 100644
index 000000000000..eda1c9f32e8b
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolImpl.java
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPool;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolProperties;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolQueueStatus;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolUpdateParameters;
+import java.util.Collections;
+import java.util.Map;
+
+public final class AgentPoolImpl implements AgentPool, AgentPool.Definition, AgentPool.Update {
+ private AgentPoolInner innerObject;
+
+ private final com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public AgentPoolProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public AgentPoolInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String registryName;
+
+ private String agentPoolName;
+
+ private AgentPoolUpdateParameters updateUpdateParameters;
+
+ public AgentPoolImpl withExistingRegistry(String resourceGroupName, String registryName) {
+ this.resourceGroupName = resourceGroupName;
+ this.registryName = registryName;
+ return this;
+ }
+
+ public AgentPool create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAgentPools()
+ .create(resourceGroupName, registryName, agentPoolName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public AgentPool create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAgentPools()
+ .create(resourceGroupName, registryName, agentPoolName, this.innerModel(), context);
+ return this;
+ }
+
+ AgentPoolImpl(String name,
+ com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager) {
+ this.innerObject = new AgentPoolInner();
+ this.serviceManager = serviceManager;
+ this.agentPoolName = name;
+ }
+
+ public AgentPoolImpl update() {
+ this.updateUpdateParameters = new AgentPoolUpdateParameters();
+ return this;
+ }
+
+ public AgentPool apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAgentPools()
+ .update(resourceGroupName, registryName, agentPoolName, updateUpdateParameters, Context.NONE);
+ return this;
+ }
+
+ public AgentPool apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAgentPools()
+ .update(resourceGroupName, registryName, agentPoolName, updateUpdateParameters, context);
+ return this;
+ }
+
+ AgentPoolImpl(AgentPoolInner innerObject,
+ com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries");
+ this.agentPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "agentPools");
+ }
+
+ public AgentPool refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAgentPools()
+ .getWithResponse(resourceGroupName, registryName, agentPoolName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AgentPool refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAgentPools()
+ .getWithResponse(resourceGroupName, registryName, agentPoolName, context)
+ .getValue();
+ return this;
+ }
+
+ public Response getQueueStatusWithResponse(Context context) {
+ return serviceManager.agentPools()
+ .getQueueStatusWithResponse(resourceGroupName, registryName, agentPoolName, context);
+ }
+
+ public AgentPoolQueueStatus getQueueStatus() {
+ return serviceManager.agentPools().getQueueStatus(resourceGroupName, registryName, agentPoolName);
+ }
+
+ public AgentPoolImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public AgentPoolImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public AgentPoolImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateUpdateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public AgentPoolImpl withProperties(AgentPoolProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public AgentPoolImpl withCount(Integer count) {
+ this.updateUpdateParameters.withCount(count);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel() == null || this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolQueueStatusImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolQueueStatusImpl.java
new file mode 100644
index 000000000000..a7557fc909fb
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolQueueStatusImpl.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolQueueStatusInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolQueueStatus;
+
+public final class AgentPoolQueueStatusImpl implements AgentPoolQueueStatus {
+ private AgentPoolQueueStatusInner innerObject;
+
+ private final com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager;
+
+ AgentPoolQueueStatusImpl(AgentPoolQueueStatusInner innerObject,
+ com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Integer count() {
+ return this.innerModel().count();
+ }
+
+ public AgentPoolQueueStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolsClientImpl.java
new file mode 100644
index 000000000000..6d937f9a70c7
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolsClientImpl.java
@@ -0,0 +1,1078 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+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.tasks.fluent.AgentPoolsClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolQueueStatusInner;
+import com.azure.resourcemanager.containerregistry.tasks.implementation.models.AgentPoolListResult;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolUpdateParameters;
+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 AgentPoolsClient.
+ */
+public final class AgentPoolsClientImpl implements AgentPoolsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AgentPoolsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ContainerRegistryTasksManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AgentPoolsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AgentPoolsClientImpl(ContainerRegistryTasksManagementClientImpl client) {
+ this.service
+ = RestProxy.create(AgentPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerRegistryTasksManagementClientAgentPools to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ContainerRegistryTasksManagementClientAgentPools")
+ public interface AgentPoolsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") AgentPoolInner agentPool,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") AgentPoolInner agentPool,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AgentPoolUpdateParameters updateParameters, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AgentPoolUpdateParameters updateParameters, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}/listQueueStatus")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getQueueStatus(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}/listQueueStatus")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getQueueStatusSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 detailed information for a given agent pool along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String registryName,
+ String agentPoolName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 detailed information for a given agent pool on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ return getWithResponseAsync(resourceGroupName, registryName, agentPoolName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 detailed information for a given agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, registryName, agentPoolName, accept, context);
+ }
+
+ /**
+ * Gets the detailed information for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 detailed information for a given agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentPoolInner get(String resourceGroupName, String registryName, String agentPoolName) {
+ return getWithResponse(resourceGroupName, registryName, agentPoolName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String registryName,
+ String agentPoolName, AgentPoolInner agentPool) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, contentType, accept,
+ agentPool, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolInner agentPool) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, contentType, accept,
+ agentPool, Context.NONE);
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolInner agentPool, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, contentType, accept,
+ agentPool, context);
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AgentPoolInner> beginCreateAsync(String resourceGroupName,
+ String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, registryName, agentPoolName, agentPool);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ AgentPoolInner.class, AgentPoolInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AgentPoolInner> beginCreate(String resourceGroupName,
+ String registryName, String agentPoolName, AgentPoolInner agentPool) {
+ Response response = createWithResponse(resourceGroupName, registryName, agentPoolName, agentPool);
+ return this.client.getLroResult(response, AgentPoolInner.class,
+ AgentPoolInner.class, Context.NONE);
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AgentPoolInner> beginCreate(String resourceGroupName,
+ String registryName, String agentPoolName, AgentPoolInner agentPool, Context context) {
+ Response response
+ = createWithResponse(resourceGroupName, registryName, agentPoolName, agentPool, context);
+ return this.client.getLroResult(response, AgentPoolInner.class,
+ AgentPoolInner.class, context);
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolInner agentPool) {
+ return beginCreateAsync(resourceGroupName, registryName, agentPoolName, agentPool).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentPoolInner create(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolInner agentPool) {
+ return beginCreate(resourceGroupName, registryName, agentPoolName, agentPool).getFinalResult();
+ }
+
+ /**
+ * Creates an agent pool for a container registry with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param agentPool The parameters of an agent pool 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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentPoolInner create(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolInner agentPool, Context context) {
+ return beginCreate(resourceGroupName, registryName, agentPoolName, agentPool, context).getFinalResult();
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String registryName,
+ String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, contentType, accept,
+ updateParameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolUpdateParameters updateParameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, contentType, accept,
+ updateParameters, Context.NONE);
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolUpdateParameters updateParameters, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, contentType, accept,
+ updateParameters, context);
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName,
+ String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, registryName, agentPoolName, updateParameters);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ AgentPoolInner.class, AgentPoolInner.class, this.client.getContext());
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName,
+ String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters) {
+ Response response
+ = updateWithResponse(resourceGroupName, registryName, agentPoolName, updateParameters);
+ return this.client.getLroResult(response, AgentPoolInner.class,
+ AgentPoolInner.class, Context.NONE);
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 the agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName,
+ String registryName, String agentPoolName, AgentPoolUpdateParameters updateParameters, Context context) {
+ Response response
+ = updateWithResponse(resourceGroupName, registryName, agentPoolName, updateParameters, context);
+ return this.client.getLroResult(response, AgentPoolInner.class,
+ AgentPoolInner.class, context);
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolUpdateParameters updateParameters) {
+ return beginUpdateAsync(resourceGroupName, registryName, agentPoolName, updateParameters).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentPoolInner update(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolUpdateParameters updateParameters) {
+ return beginUpdate(resourceGroupName, registryName, agentPoolName, updateParameters).getFinalResult();
+ }
+
+ /**
+ * Updates an agent pool with the specified parameters.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param updateParameters The parameters for updating an agent pool.
+ * @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 agentpool that has the ARM resource and properties.
+ * The agentpool will have all information to create an agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentPoolInner update(String resourceGroupName, String registryName, String agentPoolName,
+ AgentPoolUpdateParameters updateParameters, Context context) {
+ return beginUpdate(resourceGroupName, registryName, agentPoolName, updateParameters, context).getFinalResult();
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName,
+ String agentPoolName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String registryName,
+ String agentPoolName) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, Context.NONE);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, context);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName,
+ String agentPoolName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, agentPoolName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName,
+ String agentPoolName) {
+ Response response = deleteWithResponse(resourceGroupName, registryName, agentPoolName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName,
+ String agentPoolName, Context context) {
+ Response response = deleteWithResponse(resourceGroupName, registryName, agentPoolName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String registryName, String agentPoolName) {
+ return beginDeleteAsync(resourceGroupName, registryName, agentPoolName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String registryName, String agentPoolName) {
+ beginDelete(resourceGroupName, registryName, agentPoolName).getFinalResult();
+ }
+
+ /**
+ * Deletes a specified agent pool resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String registryName, String agentPoolName, Context context) {
+ beginDelete(resourceGroupName, registryName, agentPoolName, context).getFinalResult();
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String registryName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .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()));
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String registryName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String registryName) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String registryName,
+ Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String registryName) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists all the agent pools for a specified container registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 collection of agent pools as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String registryName, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 count of queued runs for a given agent pool along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getQueueStatusWithResponseAsync(String resourceGroupName,
+ String registryName, String agentPoolName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getQueueStatus(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 count of queued runs for a given agent pool on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getQueueStatusAsync(String resourceGroupName, String registryName,
+ String agentPoolName) {
+ return getQueueStatusWithResponseAsync(resourceGroupName, registryName, agentPoolName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 count of queued runs for a given agent pool along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getQueueStatusWithResponse(String resourceGroupName, String registryName,
+ String agentPoolName, Context context) {
+ final String accept = "application/json";
+ return service.getQueueStatusSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, agentPoolName, accept, context);
+ }
+
+ /**
+ * Gets the count of queued runs for a given agent pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param agentPoolName The name of the agent pool.
+ * @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 count of queued runs for a given agent pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentPoolQueueStatusInner getQueueStatus(String resourceGroupName, String registryName,
+ String agentPoolName) {
+ return getQueueStatusWithResponse(resourceGroupName, registryName, agentPoolName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 collection of agent pools along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 collection of agent pools along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 collection of agent pools along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolsImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolsImpl.java
new file mode 100644
index 000000000000..193cefc36cee
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/AgentPoolsImpl.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.AgentPoolsClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.AgentPoolQueueStatusInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPool;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPoolQueueStatus;
+import com.azure.resourcemanager.containerregistry.tasks.models.AgentPools;
+
+public final class AgentPoolsImpl implements AgentPools {
+ private static final ClientLogger LOGGER = new ClientLogger(AgentPoolsImpl.class);
+
+ private final AgentPoolsClient innerClient;
+
+ private final com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager;
+
+ public AgentPoolsImpl(AgentPoolsClient innerClient,
+ com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String registryName, String agentPoolName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, registryName, agentPoolName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AgentPoolImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AgentPool get(String resourceGroupName, String registryName, String agentPoolName) {
+ AgentPoolInner inner = this.serviceClient().get(resourceGroupName, registryName, agentPoolName);
+ if (inner != null) {
+ return new AgentPoolImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String registryName, String agentPoolName) {
+ this.serviceClient().delete(resourceGroupName, registryName, agentPoolName);
+ }
+
+ public void delete(String resourceGroupName, String registryName, String agentPoolName, Context context) {
+ this.serviceClient().delete(resourceGroupName, registryName, agentPoolName, context);
+ }
+
+ public PagedIterable list(String resourceGroupName, String registryName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String registryName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AgentPoolImpl(inner1, this.manager()));
+ }
+
+ public Response getQueueStatusWithResponse(String resourceGroupName, String registryName,
+ String agentPoolName, Context context) {
+ Response inner
+ = this.serviceClient().getQueueStatusWithResponse(resourceGroupName, registryName, agentPoolName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AgentPoolQueueStatusImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AgentPoolQueueStatus getQueueStatus(String resourceGroupName, String registryName, String agentPoolName) {
+ AgentPoolQueueStatusInner inner
+ = this.serviceClient().getQueueStatus(resourceGroupName, registryName, agentPoolName);
+ if (inner != null) {
+ return new AgentPoolQueueStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AgentPool getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries");
+ if (registryName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id)));
+ }
+ String agentPoolName = ResourceManagerUtils.getValueFromIdByName(id, "agentPools");
+ if (agentPoolName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, registryName, agentPoolName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries");
+ if (registryName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id)));
+ }
+ String agentPoolName = ResourceManagerUtils.getValueFromIdByName(id, "agentPools");
+ if (agentPoolName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, registryName, agentPoolName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries");
+ if (registryName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id)));
+ }
+ String agentPoolName = ResourceManagerUtils.getValueFromIdByName(id, "agentPools");
+ if (agentPoolName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id)));
+ }
+ this.delete(resourceGroupName, registryName, agentPoolName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries");
+ if (registryName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id)));
+ }
+ String agentPoolName = ResourceManagerUtils.getValueFromIdByName(id, "agentPools");
+ if (agentPoolName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agentPools'.", id)));
+ }
+ this.delete(resourceGroupName, registryName, agentPoolName, context);
+ }
+
+ private AgentPoolsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager manager() {
+ return this.serviceManager;
+ }
+
+ public AgentPoolImpl define(String name) {
+ return new AgentPoolImpl(name, this.manager());
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ContainerRegistryTasksManagementClientBuilder.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ContainerRegistryTasksManagementClientBuilder.java
new file mode 100644
index 000000000000..3e343829f27f
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ContainerRegistryTasksManagementClientBuilder.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.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 {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ContainerRegistryTasksManagementClientBuilder.
+ */
+ public ContainerRegistryTasksManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ContainerRegistryTasksManagementClientBuilder.
+ */
+ public ContainerRegistryTasksManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ 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, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ContainerRegistryTasksManagementClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ContainerRegistryTasksManagementClientImpl.java
new file mode 100644
index 000000000000..a4931d765bc5
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ContainerRegistryTasksManagementClientImpl.java
@@ -0,0 +1,372 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.AgentPoolsClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.ContainerRegistryTasksManagementClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.RegistriesClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.RunsClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.TaskRunsClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.TasksClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the ContainerRegistryTasksManagementClientImpl type.
+ */
+@ServiceClient(builder = ContainerRegistryTasksManagementClientBuilder.class)
+public final class ContainerRegistryTasksManagementClientImpl implements ContainerRegistryTasksManagementClient {
+ /**
+ * Service host.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Version parameter.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * 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 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;
+ }
+
+ /**
+ * The RegistriesClient object to access its operations.
+ */
+ private final RegistriesClient registries;
+
+ /**
+ * Gets the RegistriesClient object to access its operations.
+ *
+ * @return the RegistriesClient object.
+ */
+ public RegistriesClient getRegistries() {
+ return this.registries;
+ }
+
+ /**
+ * 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 endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ */
+ ContainerRegistryTasksManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2025-03-01-preview";
+ this.agentPools = new AgentPoolsClientImpl(this);
+ this.runs = new RunsClientImpl(this);
+ this.taskRuns = new TaskRunsClientImpl(this);
+ this.tasks = new TasksClientImpl(this);
+ this.registries = new RegistriesClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryTasksManagementClientImpl.class);
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RegistriesClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RegistriesClientImpl.java
new file mode 100644
index 000000000000..7c48469cdf01
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RegistriesClientImpl.java
@@ -0,0 +1,250 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.RegistriesClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.SourceUploadDefinitionInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in RegistriesClient.
+ */
+public final class RegistriesClientImpl implements RegistriesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RegistriesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ContainerRegistryTasksManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RegistriesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RegistriesClientImpl(ContainerRegistryTasksManagementClientImpl client) {
+ this.service
+ = RestProxy.create(RegistriesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerRegistryTasksManagementClientRegistries to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ContainerRegistryTasksManagementClientRegistries")
+ public interface RegistriesService {
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> scheduleRun(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") RunRequest runRequest, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response scheduleRunSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") RunRequest runRequest, 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("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getBuildSourceUploadUrlSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Schedules a new run based on the request parameters and add it to the run queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param runRequest The request body.
+ * @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) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.scheduleRun(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, runRequest,
+ 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. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param runRequest The request body.
+ * @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) {
+ return scheduleRunWithResponseAsync(resourceGroupName, registryName, runRequest)
+ .flatMap(res -> Mono.justOrEmpty(res.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. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param runRequest The request body.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response scheduleRunWithResponse(String resourceGroupName, String registryName,
+ RunRequest runRequest, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.scheduleRunSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, runRequest, 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. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param runRequest The request body.
+ * @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 scheduleRunWithResponse(resourceGroupName, registryName, runRequest, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the upload location for the user to be able to upload the source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.getBuildSourceUploadUrl(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, 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. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the upload location for the user to be able to upload the source on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private 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. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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) {
+ final String accept = "application/json";
+ return service.getBuildSourceUploadUrlSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context);
+ }
+
+ /**
+ * Get the upload location for the user to be able to upload the source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the container registry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the 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-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RegistriesImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RegistriesImpl.java
new file mode 100644
index 000000000000..cc4a6a5326e5
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RegistriesImpl.java
@@ -0,0 +1,82 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.RegistriesClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.SourceUploadDefinitionInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.Registries;
+import com.azure.resourcemanager.containerregistry.tasks.models.Run;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunRequest;
+import com.azure.resourcemanager.containerregistry.tasks.models.SourceUploadDefinition;
+
+public final class RegistriesImpl implements Registries {
+ private static final ClientLogger LOGGER = new ClientLogger(RegistriesImpl.class);
+
+ private final RegistriesClient innerClient;
+
+ private final com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager;
+
+ public RegistriesImpl(RegistriesClient innerClient,
+ com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response scheduleRunWithResponse(String resourceGroupName, String registryName, RunRequest runRequest,
+ Context context) {
+ Response inner
+ = this.serviceClient().scheduleRunWithResponse(resourceGroupName, registryName, runRequest, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new RunImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Run scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest) {
+ RunInner inner = this.serviceClient().scheduleRun(resourceGroupName, registryName, runRequest);
+ if (inner != null) {
+ return new RunImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getBuildSourceUploadUrlWithResponse(String resourceGroupName,
+ String registryName, Context context) {
+ Response inner
+ = this.serviceClient().getBuildSourceUploadUrlWithResponse(resourceGroupName, registryName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new SourceUploadDefinitionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public SourceUploadDefinition getBuildSourceUploadUrl(String resourceGroupName, String registryName) {
+ SourceUploadDefinitionInner inner
+ = this.serviceClient().getBuildSourceUploadUrl(resourceGroupName, registryName);
+ if (inner != null) {
+ return new SourceUploadDefinitionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private RegistriesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ResourceManagerUtils.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..10cd61dc1a63
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
+ }
+
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl<>(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux
+ .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunGetLogResultImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunGetLogResultImpl.java
new file mode 100644
index 000000000000..0a692805fe58
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunGetLogResultImpl.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunGetLogResultInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunGetLogResult;
+
+public final class RunGetLogResultImpl implements RunGetLogResult {
+ private RunGetLogResultInner innerObject;
+
+ private final com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager;
+
+ RunGetLogResultImpl(RunGetLogResultInner innerObject,
+ com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String logLink() {
+ return this.innerModel().logLink();
+ }
+
+ public String logArtifactLink() {
+ return this.innerModel().logArtifactLink();
+ }
+
+ public RunGetLogResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunImpl.java
new file mode 100644
index 000000000000..99e84f8610ed
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunInner;
+import com.azure.resourcemanager.containerregistry.tasks.models.Run;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunProperties;
+
+public final class RunImpl implements Run {
+ private RunInner innerObject;
+
+ private final com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager;
+
+ RunImpl(RunInner innerObject,
+ com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public RunProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public RunInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerregistry.tasks.ContainerRegistryTasksManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunsClientImpl.java b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunsClientImpl.java
new file mode 100644
index 000000000000..25b73fa2b64c
--- /dev/null
+++ b/sdk/containerregistry/azure-resourcemanager-containerregistry-tasks/src/main/java/com/azure/resourcemanager/containerregistry/tasks/implementation/RunsClientImpl.java
@@ -0,0 +1,679 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerregistry.tasks.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.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.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.RunsClient;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunGetLogResultInner;
+import com.azure.resourcemanager.containerregistry.tasks.fluent.models.RunInner;
+import com.azure.resourcemanager.containerregistry.tasks.implementation.models.RunListResult;
+import com.azure.resourcemanager.containerregistry.tasks.models.RunUpdateParameters;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in RunsClient.
+ */
+public final class RunsClientImpl implements RunsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RunsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ContainerRegistryTasksManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RunsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RunsClientImpl(ContainerRegistryTasksManagementClientImpl client) {
+ this.service = RestProxy.create(RunsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerRegistryTasksManagementClientRuns to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ContainerRegistryTasksManagementClientRuns")
+ public interface RunsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, @HeaderParam("Accept") String accept, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") RunUpdateParameters runUpdateParameters, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") RunUpdateParameters runUpdateParameters, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getLogSasUrl(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getLogSasUrlSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> cancel(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response cancelSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName,
+ @PathParam("runId") String runId, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets the detailed information for a given run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 detailed information for a given run along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String registryName, String runId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, runId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the detailed information for a given run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 detailed information for a given run on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String registryName, String runId) {
+ return getWithResponseAsync(resourceGroupName, registryName, runId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the detailed information for a given run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 detailed information for a given run along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String registryName, String runId,
+ Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, registryName, runId, accept, context);
+ }
+
+ /**
+ * Gets the detailed information for a given run.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @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 detailed information for a given run.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RunInner get(String resourceGroupName, String registryName, String runId) {
+ return getWithResponse(resourceGroupName, registryName, runId, Context.NONE).getValue();
+ }
+
+ /**
+ * Patch the run properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @param runUpdateParameters The run update properties.
+ * @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> updateWithResponseAsync(String resourceGroupName, String registryName,
+ String runId, RunUpdateParameters runUpdateParameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, runId, contentType, accept,
+ runUpdateParameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Patch the run properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @param runUpdateParameters The run update properties.
+ * @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 updateAsync(String resourceGroupName, String registryName, String runId,
+ RunUpdateParameters runUpdateParameters) {
+ return updateWithResponseAsync(resourceGroupName, registryName, runId, runUpdateParameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Patch the run properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @param runUpdateParameters The run update properties.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(String resourceGroupName, String registryName, String runId,
+ RunUpdateParameters runUpdateParameters, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, runId, contentType, accept,
+ runUpdateParameters, context);
+ }
+
+ /**
+ * Patch the run properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param runId The run ID.
+ * @param runUpdateParameters The run update properties.
+ * @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 update(String resourceGroupName, String registryName, String runId,
+ RunUpdateParameters runUpdateParameters) {
+ return updateWithResponse(resourceGroupName, registryName, runId, runUpdateParameters, Context.NONE).getValue();
+ }
+
+ /**
+ * Gets all the runs for a registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param filter The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed
+ * string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed.
+ * @param top $top is supported for get list of runs, which limits the maximum number of runs to return.
+ * @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 all the runs for a registry along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String registryName,
+ String filter, Integer top) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, 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()));
+ }
+
+ /**
+ * Gets all the runs for a registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param filter The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed
+ * string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed.
+ * @param top $top is supported for get list of runs, which limits the maximum number of runs to return.
+ * @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 all the runs for a registry as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String registryName, String filter, Integer top) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter, top),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all the runs for a registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the 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 all the runs for a registry as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String registryName) {
+ final String filter = null;
+ final Integer top = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, filter, top),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all the runs for a registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param filter The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed
+ * string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed.
+ * @param top $top is supported for get list of runs, which limits the maximum number of runs to return.
+ * @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 all the runs for a registry along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String registryName, String filter,
+ Integer top) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, registryName, filter, top, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Gets all the runs for a registry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param registryName The name of the Registry.
+ * @param filter The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed
+ * string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed.
+ * @param top $top is supported for get list of runs, which limits the maximum number of runs to return.
+ * @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 all the runs for a registry along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String registryName, String filter,
+ Integer top, Context context) {
+ final String accept = "application/json";
+ Response