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 Service Prepared Image Specification service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Container Service Prepared Image Specification service API instance.
+ */
+ public ContainerServicePreparedImageSpecificationManager 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.containerservicepreparedimgspec")
+ .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 ContainerServicePreparedImageSpecificationManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of PreparedImageSpecifications. It manages PreparedImageSpecification.
+ *
+ * @return Resource collection API of PreparedImageSpecifications.
+ */
+ public PreparedImageSpecifications preparedImageSpecifications() {
+ if (this.preparedImageSpecifications == null) {
+ this.preparedImageSpecifications
+ = new PreparedImageSpecificationsImpl(clientObject.getPreparedImageSpecifications(), this);
+ }
+ return preparedImageSpecifications;
+ }
+
+ /**
+ * Gets wrapped service client PreparedImgSpecMgmtClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client PreparedImgSpecMgmtClient.
+ */
+ public PreparedImgSpecMgmtClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/OperationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/OperationsClient.java
new file mode 100644
index 000000000000..bc06d9795dcd
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/PreparedImageSpecificationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/PreparedImageSpecificationsClient.java
new file mode 100644
index 000000000000..9a99b8b634bd
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/PreparedImageSpecificationsClient.java
@@ -0,0 +1,388 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.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.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationVersionInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecificationPatch;
+
+/**
+ * An instance of this class provides access to all the operations defined in PreparedImageSpecificationsClient.
+ */
+public interface PreparedImageSpecificationsClient {
+ /**
+ * Get a prepared image specification at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 prepared image specification at the latest version along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, Context context);
+
+ /**
+ * Get a prepared image specification at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 prepared image specification at the latest version.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PreparedImageSpecificationInner getByResourceGroup(String resourceGroupName, String preparedImageSpecificationName);
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PreparedImageSpecificationInner> beginCreateOrUpdate(
+ String resourceGroupName, String preparedImageSpecificationName, PreparedImageSpecificationInner resource);
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PreparedImageSpecificationInner> beginCreateOrUpdate(
+ String resourceGroupName, String preparedImageSpecificationName, PreparedImageSpecificationInner resource,
+ String ifMatch, String ifNoneMatch, Context context);
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PreparedImageSpecificationInner createOrUpdate(String resourceGroupName, String preparedImageSpecificationName,
+ PreparedImageSpecificationInner resource);
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PreparedImageSpecificationInner createOrUpdate(String resourceGroupName, String preparedImageSpecificationName,
+ PreparedImageSpecificationInner resource, String ifMatch, String ifNoneMatch, Context context);
+
+ /**
+ * Update the tags of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 Prepared Image Specification resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationPatch properties, String ifMatch,
+ Context context);
+
+ /**
+ * Update the tags of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param properties The resource properties to be updated.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PreparedImageSpecificationInner update(String resourceGroupName, String preparedImageSpecificationName,
+ PreparedImageSpecificationPatch properties);
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 preparedImageSpecificationName);
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName,
+ String ifMatch, Context context);
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 preparedImageSpecificationName);
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName, String ifMatch, Context context);
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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> beginDeleteVersion(String resourceGroupName,
+ String preparedImageSpecificationName, String version);
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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> beginDeleteVersion(String resourceGroupName,
+ String preparedImageSpecificationName, String version, String ifMatch, Context context);
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 deleteVersion(String resourceGroupName, String preparedImageSpecificationName, String version);
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 deleteVersion(String resourceGroupName, String preparedImageSpecificationName, String version, String ifMatch,
+ Context context);
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 response of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 response of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Get a prepared image specification at a particular version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 prepared image specification at a particular version along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getVersionWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, String version, Context context);
+
+ /**
+ * Get a prepared image specification at a particular version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 prepared image specification at a particular version.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PreparedImageSpecificationVersionInner getVersion(String resourceGroupName, String preparedImageSpecificationName,
+ String version);
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 response of a PreparedImageSpecificationVersion list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String resourceGroupName,
+ String preparedImageSpecificationName);
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 response of a PreparedImageSpecificationVersion list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String resourceGroupName,
+ String preparedImageSpecificationName, Context context);
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/PreparedImgSpecMgmtClient.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/PreparedImgSpecMgmtClient.java
new file mode 100644
index 000000000000..d7ade84fc67b
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/PreparedImgSpecMgmtClient.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for PreparedImgSpecMgmtClient class.
+ */
+public interface PreparedImgSpecMgmtClient {
+ /**
+ * 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 OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the PreparedImageSpecificationsClient object to access its operations.
+ *
+ * @return the PreparedImageSpecificationsClient object.
+ */
+ PreparedImageSpecificationsClient getPreparedImageSpecifications();
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/OperationInner.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..b2914dda4f57
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/OperationInner.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.containerservicepreparedimgspec.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 com.azure.resourcemanager.containerservicepreparedimgspec.models.ActionType;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.OperationDisplay;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Immutable
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ private OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for Azure Resource Manager/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner 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 OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/PreparedImageSpecificationInner.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/PreparedImageSpecificationInner.java
new file mode 100644
index 000000000000..8c59e72cb969
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/PreparedImageSpecificationInner.java
@@ -0,0 +1,205 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.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.containerservicepreparedimgspec.models.PreparedImageSpecificationProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The Prepared Image Specification resource.
+ */
+@Fluent
+public final class PreparedImageSpecificationInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private PreparedImageSpecificationProperties properties;
+
+ /*
+ * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
+ * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity
+ * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section
+ * 14.27) header fields.
+ */
+ private String eTag;
+
+ /*
+ * 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 PreparedImageSpecificationInner class.
+ */
+ public PreparedImageSpecificationInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public PreparedImageSpecificationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the PreparedImageSpecificationInner object itself.
+ */
+ public PreparedImageSpecificationInner withProperties(PreparedImageSpecificationProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the
+ * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource.
+ * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26),
+ * and If-Range (section 14.27) header fields.
+ *
+ * @return the eTag value.
+ */
+ public String eTag() {
+ return this.eTag;
+ }
+
+ /**
+ * 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 PreparedImageSpecificationInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PreparedImageSpecificationInner 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 PreparedImageSpecificationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PreparedImageSpecificationInner 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 PreparedImageSpecificationInner.
+ */
+ public static PreparedImageSpecificationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PreparedImageSpecificationInner deserializedPreparedImageSpecificationInner
+ = new PreparedImageSpecificationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPreparedImageSpecificationInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPreparedImageSpecificationInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPreparedImageSpecificationInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedPreparedImageSpecificationInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedPreparedImageSpecificationInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedPreparedImageSpecificationInner.properties
+ = PreparedImageSpecificationProperties.fromJson(reader);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedPreparedImageSpecificationInner.eTag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPreparedImageSpecificationInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPreparedImageSpecificationInner;
+ });
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/PreparedImageSpecificationVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/PreparedImageSpecificationVersionInner.java
new file mode 100644
index 000000000000..be09a13b20a2
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/PreparedImageSpecificationVersionInner.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.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.containerservicepreparedimgspec.models.PreparedImageSpecificationProperties;
+import java.io.IOException;
+
+/**
+ * A version of the Prepared Image Specification resource.
+ */
+@Immutable
+public final class PreparedImageSpecificationVersionInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private PreparedImageSpecificationProperties 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 PreparedImageSpecificationVersionInner class.
+ */
+ private PreparedImageSpecificationVersionInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public PreparedImageSpecificationProperties 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 PreparedImageSpecificationVersionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PreparedImageSpecificationVersionInner 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 PreparedImageSpecificationVersionInner.
+ */
+ public static PreparedImageSpecificationVersionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PreparedImageSpecificationVersionInner deserializedPreparedImageSpecificationVersionInner
+ = new PreparedImageSpecificationVersionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPreparedImageSpecificationVersionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPreparedImageSpecificationVersionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPreparedImageSpecificationVersionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPreparedImageSpecificationVersionInner.properties
+ = PreparedImageSpecificationProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPreparedImageSpecificationVersionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPreparedImageSpecificationVersionInner;
+ });
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/package-info.java
new file mode 100644
index 000000000000..8b1f8e33f790
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// 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 ContainerServicePreparedImageSpecification.
+ * Azure Kubernetes Prepared Image Specification api client.
+ */
+package com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models;
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/package-info.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/package-info.java
new file mode 100644
index 000000000000..a865d3c5c3b7
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/fluent/package-info.java
@@ -0,0 +1,9 @@
+// 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 ContainerServicePreparedImageSpecification.
+ * Azure Kubernetes Prepared Image Specification api client.
+ */
+package com.azure.resourcemanager.containerservicepreparedimgspec.fluent;
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationImpl.java
new file mode 100644
index 000000000000..5dd185c34d7a
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.implementation;
+
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.OperationInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.ActionType;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.Operation;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.OperationDisplay;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager;
+
+ OperationImpl(OperationInner innerObject,
+ com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public ActionType actionType() {
+ return this.innerModel().actionType();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..98ea3b5635d9
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationsClientImpl.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.implementation;
+
+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.PathParam;
+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.containerservicepreparedimgspec.fluent.OperationsClient;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.OperationInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.implementation.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public final class OperationsClientImpl implements OperationsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final OperationsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final PreparedImgSpecMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(PreparedImgSpecMgmtClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PreparedImgSpecMgmtClientOperations to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "PreparedImgSpecMgmtClientOperations")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.ContainerService/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.ContainerService/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @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);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * 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 a list of REST API operations supported by an Azure Resource Provider 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 a list of REST API operations supported by an Azure Resource Provider 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 a list of REST API operations supported by an Azure Resource Provider 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/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..a72ee6073279
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/OperationsImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.OperationsClient;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.OperationInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.Operation;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.Operations;
+
+public final class OperationsImpl implements Operations {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationImpl.java
new file mode 100644
index 000000000000..a049d30bedb9
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationImpl.java
@@ -0,0 +1,215 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecification;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecificationPatch;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecificationProperties;
+import java.util.Collections;
+import java.util.Map;
+
+public final class PreparedImageSpecificationImpl
+ implements PreparedImageSpecification, PreparedImageSpecification.Definition, PreparedImageSpecification.Update {
+ private PreparedImageSpecificationInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager 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 PreparedImageSpecificationProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public String eTag() {
+ return this.innerModel().eTag();
+ }
+
+ 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 PreparedImageSpecificationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager
+ manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String preparedImageSpecificationName;
+
+ private String createIfMatch;
+
+ private String createIfNoneMatch;
+
+ private String updateIfMatch;
+
+ private PreparedImageSpecificationPatch updateProperties;
+
+ public PreparedImageSpecificationImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public PreparedImageSpecification create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getPreparedImageSpecifications()
+ .createOrUpdate(resourceGroupName, preparedImageSpecificationName, this.innerModel(), createIfMatch,
+ createIfNoneMatch, Context.NONE);
+ return this;
+ }
+
+ public PreparedImageSpecification create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getPreparedImageSpecifications()
+ .createOrUpdate(resourceGroupName, preparedImageSpecificationName, this.innerModel(), createIfMatch,
+ createIfNoneMatch, context);
+ return this;
+ }
+
+ PreparedImageSpecificationImpl(String name,
+ com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager) {
+ this.innerObject = new PreparedImageSpecificationInner();
+ this.serviceManager = serviceManager;
+ this.preparedImageSpecificationName = name;
+ this.createIfMatch = null;
+ this.createIfNoneMatch = null;
+ }
+
+ public PreparedImageSpecificationImpl update() {
+ this.updateIfMatch = null;
+ this.updateProperties = new PreparedImageSpecificationPatch();
+ return this;
+ }
+
+ public PreparedImageSpecification apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getPreparedImageSpecifications()
+ .updateWithResponse(resourceGroupName, preparedImageSpecificationName, updateProperties, updateIfMatch,
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PreparedImageSpecification apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getPreparedImageSpecifications()
+ .updateWithResponse(resourceGroupName, preparedImageSpecificationName, updateProperties, updateIfMatch,
+ context)
+ .getValue();
+ return this;
+ }
+
+ PreparedImageSpecificationImpl(PreparedImageSpecificationInner innerObject,
+ com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.preparedImageSpecificationName
+ = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "preparedImageSpecifications");
+ }
+
+ public PreparedImageSpecification refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getPreparedImageSpecifications()
+ .getByResourceGroupWithResponse(resourceGroupName, preparedImageSpecificationName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PreparedImageSpecification refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getPreparedImageSpecifications()
+ .getByResourceGroupWithResponse(resourceGroupName, preparedImageSpecificationName, context)
+ .getValue();
+ return this;
+ }
+
+ public PreparedImageSpecificationImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public PreparedImageSpecificationImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public PreparedImageSpecificationImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public PreparedImageSpecificationImpl withProperties(PreparedImageSpecificationProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public PreparedImageSpecificationImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.createIfMatch = ifMatch;
+ return this;
+ } else {
+ this.updateIfMatch = ifMatch;
+ return this;
+ }
+ }
+
+ public PreparedImageSpecificationImpl withIfNoneMatch(String ifNoneMatch) {
+ this.createIfNoneMatch = ifNoneMatch;
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel() == null || this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationVersionImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationVersionImpl.java
new file mode 100644
index 000000000000..8c0252a93ddf
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationVersionImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationVersionInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecificationProperties;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecificationVersion;
+
+public final class PreparedImageSpecificationVersionImpl implements PreparedImageSpecificationVersion {
+ private PreparedImageSpecificationVersionInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager;
+
+ PreparedImageSpecificationVersionImpl(PreparedImageSpecificationVersionInner innerObject,
+ com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager 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 PreparedImageSpecificationProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public PreparedImageSpecificationVersionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationsClientImpl.java
new file mode 100644
index 000000000000..595269fa27dd
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationsClientImpl.java
@@ -0,0 +1,1814 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.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.containerservicepreparedimgspec.fluent.PreparedImageSpecificationsClient;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationVersionInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.implementation.models.PreparedImageSpecificationListResult;
+import com.azure.resourcemanager.containerservicepreparedimgspec.implementation.models.PreparedImageSpecificationVersionListResult;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecificationPatch;
+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 PreparedImageSpecificationsClient.
+ */
+public final class PreparedImageSpecificationsClientImpl implements PreparedImageSpecificationsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final PreparedImageSpecificationsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final PreparedImgSpecMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of PreparedImageSpecificationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PreparedImageSpecificationsClientImpl(PreparedImgSpecMgmtClientImpl client) {
+ this.service = RestProxy.create(PreparedImageSpecificationsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PreparedImgSpecMgmtClientPreparedImageSpecifications to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "PreparedImgSpecMgmtClientPreparedImageSpecifications")
+ public interface PreparedImageSpecificationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") PreparedImageSpecificationInner resource, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") PreparedImageSpecificationInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @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("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") PreparedImageSpecificationPatch properties, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @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("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") PreparedImageSpecificationPatch properties, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @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, @HeaderParam("If-Match") String ifMatch,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}")
+ @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, @HeaderParam("If-Match") String ifMatch,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}/versions/{version}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> deleteVersion(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @PathParam("version") String version, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}/versions/{version}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteVersionSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @PathParam("version") String version, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/preparedImageSpecifications")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/preparedImageSpecifications")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}/versions/{version}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getVersion(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}/versions/{version}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getVersionSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listVersions(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/preparedImageSpecifications/{preparedImageSpecificationName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listVersionsSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("preparedImageSpecificationName") String preparedImageSpecificationName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @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 listByResourceGroupNextSync(
+ @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)
+ Mono> listBySubscriptionNext(
+ @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 listBySubscriptionNextSync(
+ @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)
+ Mono> listVersionsNext(
+ @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 listVersionsNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a prepared image specification at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 prepared image specification at the latest version along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ getByResourceGroupWithResponseAsync(String resourceGroupName, String preparedImageSpecificationName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, preparedImageSpecificationName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a prepared image specification at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 prepared image specification at the latest version on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName,
+ String preparedImageSpecificationName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, preparedImageSpecificationName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a prepared image specification at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a prepared image specification at the latest version along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, Context context) {
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, preparedImageSpecificationName, accept, context);
+ }
+
+ /**
+ * Get a prepared image specification at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 prepared image specification at the latest version.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PreparedImageSpecificationInner getByResourceGroup(String resourceGroupName,
+ String preparedImageSpecificationName) {
+ return getByResourceGroupWithResponse(resourceGroupName, preparedImageSpecificationName, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationInner resource, String ifMatch,
+ String ifNoneMatch) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch,
+ preparedImageSpecificationName, contentType, accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationInner resource, String ifMatch,
+ String ifNoneMatch) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, preparedImageSpecificationName,
+ contentType, accept, resource, Context.NONE);
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationInner resource, String ifMatch,
+ String ifNoneMatch, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, preparedImageSpecificationName,
+ contentType, accept, resource, context);
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, PreparedImageSpecificationInner>
+ beginCreateOrUpdateAsync(String resourceGroupName, String preparedImageSpecificationName,
+ PreparedImageSpecificationInner resource, String ifMatch, String ifNoneMatch) {
+ Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName,
+ preparedImageSpecificationName, resource, ifMatch, ifNoneMatch);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), PreparedImageSpecificationInner.class, PreparedImageSpecificationInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, PreparedImageSpecificationInner>
+ beginCreateOrUpdateAsync(String resourceGroupName, String preparedImageSpecificationName,
+ PreparedImageSpecificationInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName,
+ preparedImageSpecificationName, resource, ifMatch, ifNoneMatch);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), PreparedImageSpecificationInner.class, PreparedImageSpecificationInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, PreparedImageSpecificationInner> beginCreateOrUpdate(
+ String resourceGroupName, String preparedImageSpecificationName, PreparedImageSpecificationInner resource,
+ String ifMatch, String ifNoneMatch) {
+ Response response = createOrUpdateWithResponse(resourceGroupName, preparedImageSpecificationName,
+ resource, ifMatch, ifNoneMatch);
+ return this.client.getLroResult(response,
+ PreparedImageSpecificationInner.class, PreparedImageSpecificationInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, PreparedImageSpecificationInner> beginCreateOrUpdate(
+ String resourceGroupName, String preparedImageSpecificationName, PreparedImageSpecificationInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ Response response = createOrUpdateWithResponse(resourceGroupName, preparedImageSpecificationName,
+ resource, ifMatch, ifNoneMatch);
+ return this.client.getLroResult(response,
+ PreparedImageSpecificationInner.class, PreparedImageSpecificationInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, PreparedImageSpecificationInner> beginCreateOrUpdate(
+ String resourceGroupName, String preparedImageSpecificationName, PreparedImageSpecificationInner resource,
+ String ifMatch, String ifNoneMatch, Context context) {
+ Response response = createOrUpdateWithResponse(resourceGroupName, preparedImageSpecificationName,
+ resource, ifMatch, ifNoneMatch, context);
+ return this.client.getLroResult(response,
+ PreparedImageSpecificationInner.class, PreparedImageSpecificationInner.class, context);
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationInner resource, String ifMatch,
+ String ifNoneMatch) {
+ return beginCreateOrUpdateAsync(resourceGroupName, preparedImageSpecificationName, resource, ifMatch,
+ ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @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 Prepared Image Specification resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return beginCreateOrUpdateAsync(resourceGroupName, preparedImageSpecificationName, resource, ifMatch,
+ ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PreparedImageSpecificationInner createOrUpdate(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return beginCreateOrUpdate(resourceGroupName, preparedImageSpecificationName, resource, ifMatch, ifNoneMatch)
+ .getFinalResult();
+ }
+
+ /**
+ * Create or update a prepared image specification resource with a client-provided version. Created versions are
+ * immutable; provide a different properties.version value to create a new version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch The request should only proceed if the targeted resource's etag does not match the value
+ * provided.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PreparedImageSpecificationInner createOrUpdate(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationInner resource, String ifMatch,
+ String ifNoneMatch, Context context) {
+ return beginCreateOrUpdate(resourceGroupName, preparedImageSpecificationName, resource, ifMatch, ifNoneMatch,
+ context).getFinalResult();
+ }
+
+ /**
+ * Update the tags of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 Prepared Image Specification resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationPatch properties, String ifMatch) {
+ 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, preparedImageSpecificationName, ifMatch,
+ contentType, accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update the tags of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param properties The resource properties to be updated.
+ * @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 Prepared Image Specification resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationPatch properties) {
+ final String ifMatch = null;
+ return updateWithResponseAsync(resourceGroupName, preparedImageSpecificationName, properties, ifMatch)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update the tags of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 Prepared Image Specification resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, PreparedImageSpecificationPatch properties, String ifMatch,
+ 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, preparedImageSpecificationName, ifMatch, contentType,
+ accept, properties, context);
+ }
+
+ /**
+ * Update the tags of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param properties The resource properties to be updated.
+ * @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 Prepared Image Specification resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PreparedImageSpecificationInner update(String resourceGroupName, String preparedImageSpecificationName,
+ PreparedImageSpecificationPatch properties) {
+ final String ifMatch = null;
+ return updateWithResponse(resourceGroupName, preparedImageSpecificationName, properties, ifMatch, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName, String ifMatch) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, preparedImageSpecificationName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName,
+ String ifMatch) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, preparedImageSpecificationName, Context.NONE);
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName,
+ String ifMatch, Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, preparedImageSpecificationName, context);
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName, String ifMatch) {
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, preparedImageSpecificationName, ifMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 preparedImageSpecificationName) {
+ final String ifMatch = null;
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, preparedImageSpecificationName, ifMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName, String ifMatch) {
+ Response response = deleteWithResponse(resourceGroupName, preparedImageSpecificationName, ifMatch);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 preparedImageSpecificationName) {
+ final String ifMatch = null;
+ Response response = deleteWithResponse(resourceGroupName, preparedImageSpecificationName, ifMatch);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName, String ifMatch, Context context) {
+ Response response
+ = deleteWithResponse(resourceGroupName, preparedImageSpecificationName, ifMatch, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName, String ifMatch) {
+ return beginDeleteAsync(resourceGroupName, preparedImageSpecificationName, ifMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 preparedImageSpecificationName) {
+ final String ifMatch = null;
+ return beginDeleteAsync(resourceGroupName, preparedImageSpecificationName, ifMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 preparedImageSpecificationName) {
+ final String ifMatch = null;
+ beginDelete(resourceGroupName, preparedImageSpecificationName, ifMatch).getFinalResult();
+ }
+
+ /**
+ * Delete a prepared image specification. This operation will be blocked if the resource is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 preparedImageSpecificationName, String ifMatch,
+ Context context) {
+ beginDelete(resourceGroupName, preparedImageSpecificationName, ifMatch, context).getFinalResult();
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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>> deleteVersionWithResponseAsync(String resourceGroupName,
+ String preparedImageSpecificationName, String version, String ifMatch) {
+ return FluxUtil
+ .withContext(context -> service.deleteVersion(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, preparedImageSpecificationName, version,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 deleteVersionWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, String version, String ifMatch) {
+ return service.deleteVersionSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, preparedImageSpecificationName, version,
+ Context.NONE);
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 deleteVersionWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, String version, String ifMatch, Context context) {
+ return service.deleteVersionSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, ifMatch, preparedImageSpecificationName, version,
+ context);
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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> beginDeleteVersionAsync(String resourceGroupName,
+ String preparedImageSpecificationName, String version, String ifMatch) {
+ Mono>> mono
+ = deleteVersionWithResponseAsync(resourceGroupName, preparedImageSpecificationName, version, ifMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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> beginDeleteVersionAsync(String resourceGroupName,
+ String preparedImageSpecificationName, String version) {
+ final String ifMatch = null;
+ Mono>> mono
+ = deleteVersionWithResponseAsync(resourceGroupName, preparedImageSpecificationName, version, ifMatch);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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> beginDeleteVersion(String resourceGroupName,
+ String preparedImageSpecificationName, String version, String ifMatch) {
+ Response response
+ = deleteVersionWithResponse(resourceGroupName, preparedImageSpecificationName, version, ifMatch);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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> beginDeleteVersion(String resourceGroupName,
+ String preparedImageSpecificationName, String version) {
+ final String ifMatch = null;
+ Response response
+ = deleteVersionWithResponse(resourceGroupName, preparedImageSpecificationName, version, ifMatch);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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> beginDeleteVersion(String resourceGroupName,
+ String preparedImageSpecificationName, String version, String ifMatch, Context context) {
+ Response response
+ = deleteVersionWithResponse(resourceGroupName, preparedImageSpecificationName, version, ifMatch, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 deleteVersionAsync(String resourceGroupName, String preparedImageSpecificationName,
+ String version, String ifMatch) {
+ return beginDeleteVersionAsync(resourceGroupName, preparedImageSpecificationName, version, ifMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 deleteVersionAsync(String resourceGroupName, String preparedImageSpecificationName,
+ String version) {
+ final String ifMatch = null;
+ return beginDeleteVersionAsync(resourceGroupName, preparedImageSpecificationName, version, ifMatch).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 deleteVersion(String resourceGroupName, String preparedImageSpecificationName, String version) {
+ final String ifMatch = null;
+ beginDeleteVersion(resourceGroupName, preparedImageSpecificationName, version, ifMatch).getFinalResult();
+ }
+
+ /**
+ * Delete a prepared image specification version. This operation will be blocked if the prepared image specification
+ * version is in use.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param ifMatch The request should only proceed if the targeted resource's etag matches the value provided.
+ * @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 deleteVersion(String resourceGroupName, String preparedImageSpecificationName, String version,
+ String ifMatch, Context context) {
+ beginDeleteVersion(resourceGroupName, preparedImageSpecificationName, version, ifMatch, context)
+ .getFinalResult();
+ }
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a PreparedImageSpecification list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a PreparedImageSpecification list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName,
+ Context context) {
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
+ }
+
+ /**
+ * List the prepared image specifications in a resource group at the latest version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName,
+ Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 of a PreparedImageSpecification list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 of a PreparedImageSpecification list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink));
+ }
+
+ /**
+ * List the prepared image specifications in a subscription at the latest version.
+ *
+ * @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 of a PreparedImageSpecification list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get a prepared image specification at a particular version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 prepared image specification at a particular version along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getVersionWithResponseAsync(String resourceGroupName,
+ String preparedImageSpecificationName, String version) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getVersion(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, preparedImageSpecificationName, version, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a prepared image specification at a particular version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 prepared image specification at a particular version on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getVersionAsync(String resourceGroupName,
+ String preparedImageSpecificationName, String version) {
+ return getVersionWithResponseAsync(resourceGroupName, preparedImageSpecificationName, version)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a prepared image specification at a particular version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a prepared image specification at a particular version along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getVersionWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, String version, Context context) {
+ final String accept = "application/json";
+ return service.getVersionSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, preparedImageSpecificationName, version, accept,
+ context);
+ }
+
+ /**
+ * Get a prepared image specification at a particular version.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @param version The version of the Prepared Image Specification.
+ * @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 prepared image specification at a particular version.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PreparedImageSpecificationVersionInner getVersion(String resourceGroupName,
+ String preparedImageSpecificationName, String version) {
+ return getVersionWithResponse(resourceGroupName, preparedImageSpecificationName, version, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 of a PreparedImageSpecificationVersion list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listVersionsSinglePageAsync(String resourceGroupName, String preparedImageSpecificationName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listVersions(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, preparedImageSpecificationName, 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()));
+ }
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 of a PreparedImageSpecificationVersion list operation as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listVersionsAsync(String resourceGroupName,
+ String preparedImageSpecificationName) {
+ return new PagedFlux<>(() -> listVersionsSinglePageAsync(resourceGroupName, preparedImageSpecificationName),
+ nextLink -> listVersionsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 of a PreparedImageSpecificationVersion list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsSinglePage(String resourceGroupName,
+ String preparedImageSpecificationName) {
+ final String accept = "application/json";
+ Response res = service.listVersionsSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName,
+ preparedImageSpecificationName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 of a PreparedImageSpecificationVersion list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsSinglePage(String resourceGroupName,
+ String preparedImageSpecificationName, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listVersionsSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, preparedImageSpecificationName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 of a PreparedImageSpecificationVersion list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String resourceGroupName,
+ String preparedImageSpecificationName) {
+ return new PagedIterable<>(() -> listVersionsSinglePage(resourceGroupName, preparedImageSpecificationName),
+ nextLink -> listVersionsNextSinglePage(nextLink));
+ }
+
+ /**
+ * List all versions of a prepared image specification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param preparedImageSpecificationName The name of the Prepared Image Specification resource.
+ * @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 of a PreparedImageSpecificationVersion list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String resourceGroupName,
+ String preparedImageSpecificationName, Context context) {
+ return new PagedIterable<>(
+ () -> listVersionsSinglePage(resourceGroupName, preparedImageSpecificationName, context),
+ nextLink -> listVersionsNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * 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 response of a PreparedImageSpecification list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(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 response of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(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 response of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ 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.
+ * @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 of a PreparedImageSpecification list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listBySubscriptionNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(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 response of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(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 response of a PreparedImageSpecification list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ 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.
+ * @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 of a PreparedImageSpecificationVersion list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listVersionsNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listVersionsNext(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 response of a PreparedImageSpecificationVersion list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listVersionsNextSync(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 response of a PreparedImageSpecificationVersion list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsNextSinglePage(String nextLink,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listVersionsNextSync(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/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationsImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationsImpl.java
new file mode 100644
index 000000000000..20c5995c78cf
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImageSpecificationsImpl.java
@@ -0,0 +1,205 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.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.containerservicepreparedimgspec.fluent.PreparedImageSpecificationsClient;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.models.PreparedImageSpecificationVersionInner;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecification;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecificationVersion;
+import com.azure.resourcemanager.containerservicepreparedimgspec.models.PreparedImageSpecifications;
+
+public final class PreparedImageSpecificationsImpl implements PreparedImageSpecifications {
+ private static final ClientLogger LOGGER = new ClientLogger(PreparedImageSpecificationsImpl.class);
+
+ private final PreparedImageSpecificationsClient innerClient;
+
+ private final com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager;
+
+ public PreparedImageSpecificationsImpl(PreparedImageSpecificationsClient innerClient,
+ com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, Context context) {
+ Response inner = this.serviceClient()
+ .getByResourceGroupWithResponse(resourceGroupName, preparedImageSpecificationName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new PreparedImageSpecificationImpl(inner.getValue(), this.manager()));
+ }
+
+ public PreparedImageSpecification getByResourceGroup(String resourceGroupName,
+ String preparedImageSpecificationName) {
+ PreparedImageSpecificationInner inner
+ = this.serviceClient().getByResourceGroup(resourceGroupName, preparedImageSpecificationName);
+ if (inner != null) {
+ return new PreparedImageSpecificationImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String preparedImageSpecificationName) {
+ this.serviceClient().delete(resourceGroupName, preparedImageSpecificationName);
+ }
+
+ public void delete(String resourceGroupName, String preparedImageSpecificationName, String ifMatch,
+ Context context) {
+ this.serviceClient().delete(resourceGroupName, preparedImageSpecificationName, ifMatch, context);
+ }
+
+ public void deleteVersion(String resourceGroupName, String preparedImageSpecificationName, String version) {
+ this.serviceClient().deleteVersion(resourceGroupName, preparedImageSpecificationName, version);
+ }
+
+ public void deleteVersion(String resourceGroupName, String preparedImageSpecificationName, String version,
+ String ifMatch, Context context) {
+ this.serviceClient()
+ .deleteVersion(resourceGroupName, preparedImageSpecificationName, version, ifMatch, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new PreparedImageSpecificationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new PreparedImageSpecificationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new PreparedImageSpecificationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new PreparedImageSpecificationImpl(inner1, this.manager()));
+ }
+
+ public Response getVersionWithResponse(String resourceGroupName,
+ String preparedImageSpecificationName, String version, Context context) {
+ Response inner = this.serviceClient()
+ .getVersionWithResponse(resourceGroupName, preparedImageSpecificationName, version, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new PreparedImageSpecificationVersionImpl(inner.getValue(), this.manager()));
+ }
+
+ public PreparedImageSpecificationVersion getVersion(String resourceGroupName, String preparedImageSpecificationName,
+ String version) {
+ PreparedImageSpecificationVersionInner inner
+ = this.serviceClient().getVersion(resourceGroupName, preparedImageSpecificationName, version);
+ if (inner != null) {
+ return new PreparedImageSpecificationVersionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listVersions(String resourceGroupName,
+ String preparedImageSpecificationName) {
+ PagedIterable inner
+ = this.serviceClient().listVersions(resourceGroupName, preparedImageSpecificationName);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new PreparedImageSpecificationVersionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listVersions(String resourceGroupName,
+ String preparedImageSpecificationName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listVersions(resourceGroupName, preparedImageSpecificationName, context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new PreparedImageSpecificationVersionImpl(inner1, this.manager()));
+ }
+
+ public PreparedImageSpecification 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 preparedImageSpecificationName
+ = ResourceManagerUtils.getValueFromIdByName(id, "preparedImageSpecifications");
+ if (preparedImageSpecificationName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'preparedImageSpecifications'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, preparedImageSpecificationName, 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 preparedImageSpecificationName
+ = ResourceManagerUtils.getValueFromIdByName(id, "preparedImageSpecifications");
+ if (preparedImageSpecificationName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'preparedImageSpecifications'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, preparedImageSpecificationName, 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 preparedImageSpecificationName
+ = ResourceManagerUtils.getValueFromIdByName(id, "preparedImageSpecifications");
+ if (preparedImageSpecificationName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'preparedImageSpecifications'.", id)));
+ }
+ String localIfMatch = null;
+ this.delete(resourceGroupName, preparedImageSpecificationName, localIfMatch, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, String ifMatch, 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 preparedImageSpecificationName
+ = ResourceManagerUtils.getValueFromIdByName(id, "preparedImageSpecifications");
+ if (preparedImageSpecificationName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'preparedImageSpecifications'.", id)));
+ }
+ this.delete(resourceGroupName, preparedImageSpecificationName, ifMatch, context);
+ }
+
+ private PreparedImageSpecificationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerservicepreparedimgspec.ContainerServicePreparedImageSpecificationManager
+ manager() {
+ return this.serviceManager;
+ }
+
+ public PreparedImageSpecificationImpl define(String name) {
+ return new PreparedImageSpecificationImpl(name, this.manager());
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImgSpecMgmtClientBuilder.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImgSpecMgmtClientBuilder.java
new file mode 100644
index 000000000000..1a330abd7664
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImgSpecMgmtClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.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 PreparedImgSpecMgmtClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { PreparedImgSpecMgmtClientImpl.class })
+public final class PreparedImgSpecMgmtClientBuilder {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the PreparedImgSpecMgmtClientBuilder.
+ */
+ public PreparedImgSpecMgmtClientBuilder 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 PreparedImgSpecMgmtClientBuilder.
+ */
+ public PreparedImgSpecMgmtClientBuilder 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 PreparedImgSpecMgmtClientBuilder.
+ */
+ public PreparedImgSpecMgmtClientBuilder 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 PreparedImgSpecMgmtClientBuilder.
+ */
+ public PreparedImgSpecMgmtClientBuilder 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 PreparedImgSpecMgmtClientBuilder.
+ */
+ public PreparedImgSpecMgmtClientBuilder 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 PreparedImgSpecMgmtClientBuilder.
+ */
+ public PreparedImgSpecMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of PreparedImgSpecMgmtClientImpl with the provided parameters.
+ *
+ * @return an instance of PreparedImgSpecMgmtClientImpl.
+ */
+ public PreparedImgSpecMgmtClientImpl 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();
+ PreparedImgSpecMgmtClientImpl client = new PreparedImgSpecMgmtClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImgSpecMgmtClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImgSpecMgmtClientImpl.java
new file mode 100644
index 000000000000..9f0101b70bcd
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/PreparedImgSpecMgmtClientImpl.java
@@ -0,0 +1,324 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.containerservicepreparedimgspec.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.containerservicepreparedimgspec.fluent.OperationsClient;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.PreparedImageSpecificationsClient;
+import com.azure.resourcemanager.containerservicepreparedimgspec.fluent.PreparedImgSpecMgmtClient;
+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 PreparedImgSpecMgmtClientImpl type.
+ */
+@ServiceClient(builder = PreparedImgSpecMgmtClientBuilder.class)
+public final class PreparedImgSpecMgmtClientImpl implements PreparedImgSpecMgmtClient {
+ /**
+ * 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 OperationsClient object to access its operations.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The PreparedImageSpecificationsClient object to access its operations.
+ */
+ private final PreparedImageSpecificationsClient preparedImageSpecifications;
+
+ /**
+ * Gets the PreparedImageSpecificationsClient object to access its operations.
+ *
+ * @return the PreparedImageSpecificationsClient object.
+ */
+ public PreparedImageSpecificationsClient getPreparedImageSpecifications() {
+ return this.preparedImageSpecifications;
+ }
+
+ /**
+ * Initializes an instance of PreparedImgSpecMgmtClient 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.
+ */
+ PreparedImgSpecMgmtClientImpl(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 = "2026-02-02-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.preparedImageSpecifications = new PreparedImageSpecificationsClientImpl(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 ? new byte[0] : 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(PreparedImgSpecMgmtClientImpl.class);
+}
diff --git a/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/ResourceManagerUtils.java b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..ee91a4f8c9a9
--- /dev/null
+++ b/sdk/containerservice/azure-resourcemanager-containerservicepreparedimgspec/src/main/java/com/azure/resourcemanager/containerservicepreparedimgspec/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.containerservicepreparedimgspec.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