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 ExtensionTypes service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ExtensionTypes service API instance.
+ */
+ public ExtensionTypesManager 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.kubernetesconfiguration.extensiontypes")
+ .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 ExtensionTypesManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of ExtensionTypes.
+ *
+ * @return Resource collection API of ExtensionTypes.
+ */
+ public ExtensionTypes extensionTypes() {
+ if (this.extensionTypes == null) {
+ this.extensionTypes = new ExtensionTypesImpl(clientObject.getExtensionTypes(), this);
+ }
+ return extensionTypes;
+ }
+
+ /**
+ * Gets wrapped service client ExtensionTypesMgmtClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client ExtensionTypesMgmtClient.
+ */
+ public ExtensionTypesMgmtClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/ExtensionTypesClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/ExtensionTypesClient.java
new file mode 100644
index 000000000000..0017526f5c0d
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/ExtensionTypesClient.java
@@ -0,0 +1,304 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.ExtensionTypeInner;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.VersionForReleaseTrainInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ExtensionTypesClient.
+ */
+public interface ExtensionTypesClient {
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable locationList(String location);
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable locationList(String location, String publisherId, String offerId, String planId,
+ String releaseTrain, String clusterType, Context context);
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response locationGetWithResponse(String location, String extensionTypeName, Context context);
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtensionTypeInner locationGet(String location, String extensionTypeName);
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String location, String extensionTypeName);
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listVersions(String location, String extensionTypeName,
+ String releaseTrain, String clusterType, String majorVersion, Boolean showLatest, Context context);
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an extension type and location along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getVersionWithResponse(String location, String extensionTypeName,
+ String versionNumber, Context context);
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an extension type and location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VersionForReleaseTrainInner getVersion(String location, String extensionTypeName, String versionNumber);
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName);
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String publisherId, String offerId, String planId, String releaseTrain, Context context);
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String extensionTypeName, Context context);
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExtensionTypeInner get(String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName,
+ String extensionTypeName);
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName);
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String releaseTrain,
+ String majorVersion, Boolean showLatest, Context context);
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an Extension Type installable to the cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response clusterGetVersionWithResponse(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String versionNumber,
+ Context context);
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an Extension Type installable to the cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VersionForReleaseTrainInner clusterGetVersion(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String versionNumber);
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/ExtensionTypesMgmtClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/ExtensionTypesMgmtClient.java
new file mode 100644
index 000000000000..54ae436a30e4
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/ExtensionTypesMgmtClient.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for ExtensionTypesMgmtClient class.
+ */
+public interface ExtensionTypesMgmtClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * 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 ExtensionTypesClient object to access its operations.
+ *
+ * @return the ExtensionTypesClient object.
+ */
+ ExtensionTypesClient getExtensionTypes();
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/ClusterScopeSettingsProperties.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/ClusterScopeSettingsProperties.java
new file mode 100644
index 000000000000..4325b3a433a6
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/ClusterScopeSettingsProperties.java
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Extension scope settings.
+ */
+@Fluent
+public final class ClusterScopeSettingsProperties implements JsonSerializable {
+ /*
+ * Describes if multiple instances of the extension are allowed
+ */
+ private Boolean allowMultipleInstances;
+
+ /*
+ * Default extension release namespace
+ */
+ private String defaultReleaseNamespace;
+
+ /**
+ * Creates an instance of ClusterScopeSettingsProperties class.
+ */
+ public ClusterScopeSettingsProperties() {
+ }
+
+ /**
+ * Get the allowMultipleInstances property: Describes if multiple instances of the extension are allowed.
+ *
+ * @return the allowMultipleInstances value.
+ */
+ public Boolean allowMultipleInstances() {
+ return this.allowMultipleInstances;
+ }
+
+ /**
+ * Set the allowMultipleInstances property: Describes if multiple instances of the extension are allowed.
+ *
+ * @param allowMultipleInstances the allowMultipleInstances value to set.
+ * @return the ClusterScopeSettingsProperties object itself.
+ */
+ public ClusterScopeSettingsProperties withAllowMultipleInstances(Boolean allowMultipleInstances) {
+ this.allowMultipleInstances = allowMultipleInstances;
+ return this;
+ }
+
+ /**
+ * Get the defaultReleaseNamespace property: Default extension release namespace.
+ *
+ * @return the defaultReleaseNamespace value.
+ */
+ public String defaultReleaseNamespace() {
+ return this.defaultReleaseNamespace;
+ }
+
+ /**
+ * Set the defaultReleaseNamespace property: Default extension release namespace.
+ *
+ * @param defaultReleaseNamespace the defaultReleaseNamespace value to set.
+ * @return the ClusterScopeSettingsProperties object itself.
+ */
+ public ClusterScopeSettingsProperties withDefaultReleaseNamespace(String defaultReleaseNamespace) {
+ this.defaultReleaseNamespace = defaultReleaseNamespace;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("allowMultipleInstances", this.allowMultipleInstances);
+ jsonWriter.writeStringField("defaultReleaseNamespace", this.defaultReleaseNamespace);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterScopeSettingsProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterScopeSettingsProperties 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 ClusterScopeSettingsProperties.
+ */
+ public static ClusterScopeSettingsProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterScopeSettingsProperties deserializedClusterScopeSettingsProperties
+ = new ClusterScopeSettingsProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("allowMultipleInstances".equals(fieldName)) {
+ deserializedClusterScopeSettingsProperties.allowMultipleInstances
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("defaultReleaseNamespace".equals(fieldName)) {
+ deserializedClusterScopeSettingsProperties.defaultReleaseNamespace = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterScopeSettingsProperties;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/ExtensionTypeInner.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/ExtensionTypeInner.java
new file mode 100644
index 000000000000..8758201aa616
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/ExtensionTypeInner.java
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.ExtensionTypeProperties;
+import java.io.IOException;
+
+/**
+ * The Extension Type object.
+ */
+@Fluent
+public final class ExtensionTypeInner extends ProxyResource {
+ /*
+ * The properties property.
+ */
+ private ExtensionTypeProperties properties;
+
+ /*
+ * 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 ExtensionTypeInner class.
+ */
+ public ExtensionTypeInner() {
+ }
+
+ /**
+ * Get the properties property: The properties property.
+ *
+ * @return the properties value.
+ */
+ public ExtensionTypeProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties property.
+ *
+ * @param properties the properties value to set.
+ * @return the ExtensionTypeInner object itself.
+ */
+ public ExtensionTypeInner withProperties(ExtensionTypeProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtensionTypeInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtensionTypeInner 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 ExtensionTypeInner.
+ */
+ public static ExtensionTypeInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtensionTypeInner deserializedExtensionTypeInner = new ExtensionTypeInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedExtensionTypeInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedExtensionTypeInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedExtensionTypeInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedExtensionTypeInner.properties = ExtensionTypeProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtensionTypeInner;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/VersionForReleaseTrainInner.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/VersionForReleaseTrainInner.java
new file mode 100644
index 000000000000..34985345c5cd
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/VersionForReleaseTrainInner.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.VersionForReleaseTrainProperties;
+import java.io.IOException;
+
+/**
+ * The Extension Type Version object.
+ */
+@Fluent
+public final class VersionForReleaseTrainInner extends ProxyResource {
+ /*
+ * The properties property.
+ */
+ private VersionForReleaseTrainProperties properties;
+
+ /*
+ * 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 VersionForReleaseTrainInner class.
+ */
+ public VersionForReleaseTrainInner() {
+ }
+
+ /**
+ * Get the properties property: The properties property.
+ *
+ * @return the properties value.
+ */
+ public VersionForReleaseTrainProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties property.
+ *
+ * @param properties the properties value to set.
+ * @return the VersionForReleaseTrainInner object itself.
+ */
+ public VersionForReleaseTrainInner withProperties(VersionForReleaseTrainProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VersionForReleaseTrainInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VersionForReleaseTrainInner 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 VersionForReleaseTrainInner.
+ */
+ public static VersionForReleaseTrainInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ VersionForReleaseTrainInner deserializedVersionForReleaseTrainInner = new VersionForReleaseTrainInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedVersionForReleaseTrainInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedVersionForReleaseTrainInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedVersionForReleaseTrainInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedVersionForReleaseTrainInner.properties
+ = VersionForReleaseTrainProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedVersionForReleaseTrainInner;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/package-info.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/models/package-info.java
new file mode 100644
index 000000000000..b8bc02da0685
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/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) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for ExtensionTypesMgmtClient.
+ * KubernetesConfiguration Extension Types Client.
+ */
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models;
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/package-info.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/fluent/package-info.java
new file mode 100644
index 000000000000..32fb367515ff
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/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) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for ExtensionTypesMgmtClient.
+ * KubernetesConfiguration Extension Types Client.
+ */
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent;
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypeImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypeImpl.java
new file mode 100644
index 000000000000..3ce7bc9c454b
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypeImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.implementation;
+
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.ExtensionTypeInner;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.ExtensionType;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.ExtensionTypeProperties;
+
+public final class ExtensionTypeImpl implements ExtensionType {
+ private ExtensionTypeInner innerObject;
+
+ private final com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager serviceManager;
+
+ ExtensionTypeImpl(ExtensionTypeInner innerObject,
+ com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager 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 ExtensionTypeProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ExtensionTypeInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesClientImpl.java
new file mode 100644
index 000000000000..51d58fe31da9
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesClientImpl.java
@@ -0,0 +1,2143 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.ExtensionTypesClient;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.ExtensionTypeInner;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.VersionForReleaseTrainInner;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.ExtensionTypeVersionsList;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.ExtensionTypesList;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ExtensionTypesClient.
+ */
+public final class ExtensionTypesClientImpl implements ExtensionTypesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ExtensionTypesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ExtensionTypesMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of ExtensionTypesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ExtensionTypesClientImpl(ExtensionTypesMgmtClientImpl client) {
+ this.service
+ = RestProxy.create(ExtensionTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ExtensionTypesMgmtClientExtensionTypes to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ExtensionTypesMgmtCl")
+ public interface ExtensionTypesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> locationList(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @QueryParam("publisherId") String publisherId, @QueryParam("offerId") String offerId,
+ @QueryParam("planId") String planId, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("clusterType") String clusterType, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response locationListSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @QueryParam("publisherId") String publisherId, @QueryParam("offerId") String offerId,
+ @QueryParam("planId") String planId, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("clusterType") String clusterType, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes/{extensionTypeName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> locationGet(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes/{extensionTypeName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response locationGetSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes/{extensionTypeName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listVersions(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("clusterType") String clusterType, @QueryParam("majorVersion") String majorVersion,
+ @QueryParam("showLatest") Boolean showLatest, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes/{extensionTypeName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listVersionsSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("clusterType") String clusterType, @QueryParam("majorVersion") String majorVersion,
+ @QueryParam("showLatest") Boolean showLatest, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes/{extensionTypeName}/versions/{versionNumber}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getVersion(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @PathParam("extensionTypeName") String extensionTypeName, @PathParam("versionNumber") String versionNumber,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}/extensionTypes/{extensionTypeName}/versions/{versionNumber}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getVersionSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location,
+ @PathParam("extensionTypeName") String extensionTypeName, @PathParam("versionNumber") String versionNumber,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @QueryParam("publisherId") String publisherId, @QueryParam("offerId") String offerId,
+ @QueryParam("planId") String planId, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @QueryParam("publisherId") String publisherId, @QueryParam("offerId") String offerId,
+ @QueryParam("planId") String planId, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes/{extensionTypeName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes/{extensionTypeName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes/{extensionTypeName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> clusterListVersions(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("majorVersion") String majorVersion, @QueryParam("showLatest") Boolean showLatest,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes/{extensionTypeName}/versions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response clusterListVersionsSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @PathParam("extensionTypeName") String extensionTypeName, @QueryParam("releaseTrain") String releaseTrain,
+ @QueryParam("majorVersion") String majorVersion, @QueryParam("showLatest") Boolean showLatest,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes/{extensionTypeName}/versions/{versionNumber}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> clusterGetVersion(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @PathParam("extensionTypeName") String extensionTypeName, @PathParam("versionNumber") String versionNumber,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes/{extensionTypeName}/versions/{versionNumber}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response clusterGetVersionSync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterRp") String clusterRp,
+ @PathParam("clusterResourceName") String clusterResourceName, @PathParam("clusterName") String clusterName,
+ @PathParam("extensionTypeName") String extensionTypeName, @PathParam("versionNumber") String versionNumber,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> locationListNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response locationListNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") 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("$host") 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("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> clusterListVersionsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response clusterListVersionsNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> locationListSinglePageAsync(String location, String publisherId,
+ String offerId, String planId, String releaseTrain, String clusterType) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.locationList(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ location, publisherId, offerId, planId, releaseTrain, clusterType, 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 all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux locationListAsync(String location, String publisherId, String offerId,
+ String planId, String releaseTrain, String clusterType) {
+ return new PagedFlux<>(
+ () -> locationListSinglePageAsync(location, publisherId, offerId, planId, releaseTrain, clusterType),
+ nextLink -> locationListNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux locationListAsync(String location) {
+ final String publisherId = null;
+ final String offerId = null;
+ final String planId = null;
+ final String releaseTrain = null;
+ final String clusterType = null;
+ return new PagedFlux<>(
+ () -> locationListSinglePageAsync(location, publisherId, offerId, planId, releaseTrain, clusterType),
+ nextLink -> locationListNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse locationListSinglePage(String location, String publisherId,
+ String offerId, String planId, String releaseTrain, String clusterType) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.locationListSync(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), location, publisherId, offerId, planId, releaseTrain, clusterType,
+ this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse locationListSinglePage(String location, String publisherId,
+ String offerId, String planId, String releaseTrain, String clusterType, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.locationListSync(this.client.getEndpoint(), this.client.getSubscriptionId(), location,
+ publisherId, offerId, planId, releaseTrain, clusterType, this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable locationList(String location) {
+ final String publisherId = null;
+ final String offerId = null;
+ final String planId = null;
+ final String releaseTrain = null;
+ final String clusterType = null;
+ return new PagedIterable<>(
+ () -> locationListSinglePage(location, publisherId, offerId, planId, releaseTrain, clusterType),
+ nextLink -> locationListNextSinglePage(nextLink));
+ }
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable locationList(String location, String publisherId, String offerId,
+ String planId, String releaseTrain, String clusterType, Context context) {
+ return new PagedIterable<>(
+ () -> locationListSinglePage(location, publisherId, offerId, planId, releaseTrain, clusterType, context),
+ nextLink -> locationListNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> locationGetWithResponseAsync(String location, String extensionTypeName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.locationGet(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ location, extensionTypeName, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono locationGetAsync(String location, String extensionTypeName) {
+ return locationGetWithResponseAsync(location, extensionTypeName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response locationGetWithResponse(String location, String extensionTypeName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.locationGetSync(this.client.getEndpoint(), this.client.getSubscriptionId(), location,
+ extensionTypeName, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtensionTypeInner locationGet(String location, String extensionTypeName) {
+ return locationGetWithResponse(location, extensionTypeName, Context.NONE).getValue();
+ }
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query 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 list Extension Type Versions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsSinglePageAsync(String location,
+ String extensionTypeName, String releaseTrain, String clusterType, String majorVersion, Boolean showLatest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listVersions(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ location, extensionTypeName, releaseTrain, clusterType, majorVersion, showLatest,
+ 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 versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query 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 list Extension Type Versions as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listVersionsAsync(String location, String extensionTypeName,
+ String releaseTrain, String clusterType, String majorVersion, Boolean showLatest) {
+ return new PagedFlux<>(() -> listVersionsSinglePageAsync(location, extensionTypeName, releaseTrain, clusterType,
+ majorVersion, showLatest), nextLink -> listVersionsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Type Versions as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listVersionsAsync(String location, String extensionTypeName) {
+ final String releaseTrain = null;
+ final String clusterType = null;
+ final String majorVersion = null;
+ final Boolean showLatest = null;
+ return new PagedFlux<>(() -> listVersionsSinglePageAsync(location, extensionTypeName, releaseTrain, clusterType,
+ majorVersion, showLatest), nextLink -> listVersionsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query 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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsSinglePage(String location, String extensionTypeName,
+ String releaseTrain, String clusterType, String majorVersion, Boolean showLatest) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listVersionsSync(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), location, extensionTypeName, releaseTrain, clusterType, majorVersion,
+ showLatest, this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsSinglePage(String location, String extensionTypeName,
+ String releaseTrain, String clusterType, String majorVersion, Boolean showLatest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listVersionsSync(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), location, extensionTypeName, releaseTrain, clusterType, majorVersion,
+ showLatest, this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String location, String extensionTypeName) {
+ final String releaseTrain = null;
+ final String clusterType = null;
+ final String majorVersion = null;
+ final Boolean showLatest = null;
+ return new PagedIterable<>(() -> listVersionsSinglePage(location, extensionTypeName, releaseTrain, clusterType,
+ majorVersion, showLatest), nextLink -> listVersionsNextSinglePage(nextLink));
+ }
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listVersions(String location, String extensionTypeName,
+ String releaseTrain, String clusterType, String majorVersion, Boolean showLatest, Context context) {
+ return new PagedIterable<>(() -> listVersionsSinglePage(location, extensionTypeName, releaseTrain, clusterType,
+ majorVersion, showLatest, context), nextLink -> listVersionsNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a version for an extension type and location along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getVersionWithResponseAsync(String location,
+ String extensionTypeName, String versionNumber) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ if (versionNumber == null) {
+ return Mono.error(new IllegalArgumentException("Parameter versionNumber is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getVersion(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ location, extensionTypeName, versionNumber, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a version for an extension type and location on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getVersionAsync(String location, String extensionTypeName,
+ String versionNumber) {
+ return getVersionWithResponseAsync(location, extensionTypeName, versionNumber)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an extension type and location along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getVersionWithResponse(String location, String extensionTypeName,
+ String versionNumber, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ if (versionNumber == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter versionNumber is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getVersionSync(this.client.getEndpoint(), this.client.getSubscriptionId(), location,
+ extensionTypeName, versionNumber, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a version for an extension type and location.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public VersionForReleaseTrainInner getVersion(String location, String extensionTypeName, String versionNumber) {
+ return getVersionWithResponse(location, extensionTypeName, versionNumber, Context.NONE).getValue();
+ }
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String publisherId, String offerId, String planId,
+ String releaseTrain) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, clusterRp, clusterResourceName, clusterName, publisherId, offerId, planId,
+ releaseTrain, 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 installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String publisherId, String offerId, String planId,
+ String releaseTrain) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ publisherId, offerId, planId, releaseTrain), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName) {
+ final String publisherId = null;
+ final String offerId = null;
+ final String planId = null;
+ final String releaseTrain = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ publisherId, offerId, planId, releaseTrain), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String publisherId, String offerId, String planId,
+ String releaseTrain) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, clusterRp, clusterResourceName, clusterName, publisherId, offerId, planId, releaseTrain,
+ this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String publisherId, String offerId, String planId,
+ String releaseTrain, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, clusterRp, clusterResourceName, clusterName, publisherId, offerId, planId, releaseTrain,
+ this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName) {
+ final String publisherId = null;
+ final String offerId = null;
+ final String planId = null;
+ final String releaseTrain = null;
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ publisherId, offerId, planId, releaseTrain), nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String publisherId, String offerId, String planId,
+ String releaseTrain, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ publisherId, offerId, planId, releaseTrain, context), nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster along with
+ * {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName,
+ this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String extensionTypeName) {
+ return getWithResponseAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterRp,
+ clusterResourceName, clusterName, extensionTypeName, this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ExtensionTypeInner get(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String extensionTypeName) {
+ return getWithResponse(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query 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 list Extension Type Versions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> clusterListVersionsSinglePageAsync(
+ String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName,
+ String extensionTypeName, String releaseTrain, String majorVersion, Boolean showLatest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.clusterListVersions(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName, releaseTrain,
+ majorVersion, showLatest, 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 version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query 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 list Extension Type Versions as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux clusterListVersionsAsync(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String releaseTrain,
+ String majorVersion, Boolean showLatest) {
+ return new PagedFlux<>(
+ () -> clusterListVersionsSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, releaseTrain, majorVersion, showLatest),
+ nextLink -> clusterListVersionsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Type Versions as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux clusterListVersionsAsync(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName) {
+ final String releaseTrain = null;
+ final String majorVersion = null;
+ final Boolean showLatest = null;
+ return new PagedFlux<>(
+ () -> clusterListVersionsSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, releaseTrain, majorVersion, showLatest),
+ nextLink -> clusterListVersionsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query 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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse clusterListVersionsSinglePage(String resourceGroupName,
+ String clusterRp, String clusterResourceName, String clusterName, String extensionTypeName, String releaseTrain,
+ String majorVersion, Boolean showLatest) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.clusterListVersionsSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName, releaseTrain,
+ majorVersion, showLatest, this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse clusterListVersionsSinglePage(String resourceGroupName,
+ String clusterRp, String clusterResourceName, String clusterName, String extensionTypeName, String releaseTrain,
+ String majorVersion, Boolean showLatest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.clusterListVersionsSync(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, releaseTrain, majorVersion, showLatest, this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName) {
+ final String releaseTrain = null;
+ final String majorVersion = null;
+ final Boolean showLatest = null;
+ return new PagedIterable<>(
+ () -> clusterListVersionsSinglePage(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, releaseTrain, majorVersion, showLatest),
+ nextLink -> clusterListVersionsNextSinglePage(nextLink));
+ }
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String releaseTrain,
+ String majorVersion, Boolean showLatest, Context context) {
+ return new PagedIterable<>(
+ () -> clusterListVersionsSinglePage(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, releaseTrain, majorVersion, showLatest, context),
+ nextLink -> clusterListVersionsNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a version for an Extension Type installable to the cluster along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> clusterGetVersionWithResponseAsync(String resourceGroupName,
+ String clusterRp, String clusterResourceName, String clusterName, String extensionTypeName,
+ String versionNumber) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ if (versionNumber == null) {
+ return Mono.error(new IllegalArgumentException("Parameter versionNumber is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.clusterGetVersion(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, versionNumber, this.client.getApiVersion(), accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a version for an Extension Type installable to the cluster on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono clusterGetVersionAsync(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String versionNumber) {
+ return clusterGetVersionWithResponseAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, versionNumber).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an Extension Type installable to the cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response clusterGetVersionWithResponse(String resourceGroupName,
+ String clusterRp, String clusterResourceName, String clusterName, String extensionTypeName,
+ String versionNumber, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterRp == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterRp is required and cannot be null."));
+ }
+ if (clusterResourceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (extensionTypeName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null."));
+ }
+ if (versionNumber == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter versionNumber is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.clusterGetVersionSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName, versionNumber,
+ this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a version for an Extension Type installable to the cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public VersionForReleaseTrainInner clusterGetVersion(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String versionNumber) {
+ return clusterGetVersionWithResponse(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, versionNumber, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Extension Types along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> locationListNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.locationListNext(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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse locationListNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.locationListNextSync(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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse locationListNextSinglePage(String nextLink, Context context) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.locationListNextSync(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 list Extension Type Versions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listVersionsNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ 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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listVersionsNextSinglePage(String nextLink, Context context) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ 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);
+ }
+
+ /**
+ * 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 list Extension Types along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ 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 list Extension Types along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ 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);
+ }
+
+ /**
+ * 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 list Extension Type Versions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> clusterListVersionsNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.clusterListVersionsNext(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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse clusterListVersionsNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.clusterListVersionsNextSync(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 list Extension Type Versions along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse clusterListVersionsNextSinglePage(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.clusterListVersionsNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExtensionTypesClientImpl.class);
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesImpl.java
new file mode 100644
index 000000000000..1c3b8e01a558
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesImpl.java
@@ -0,0 +1,186 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.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.kubernetesconfiguration.extensiontypes.fluent.ExtensionTypesClient;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.ExtensionTypeInner;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.VersionForReleaseTrainInner;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.ExtensionType;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.ExtensionTypes;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.VersionForReleaseTrain;
+
+public final class ExtensionTypesImpl implements ExtensionTypes {
+ private static final ClientLogger LOGGER = new ClientLogger(ExtensionTypesImpl.class);
+
+ private final ExtensionTypesClient innerClient;
+
+ private final com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager serviceManager;
+
+ public ExtensionTypesImpl(ExtensionTypesClient innerClient,
+ com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable locationList(String location) {
+ PagedIterable inner = this.serviceClient().locationList(location);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable locationList(String location, String publisherId, String offerId, String planId,
+ String releaseTrain, String clusterType, Context context) {
+ PagedIterable inner = this.serviceClient()
+ .locationList(location, publisherId, offerId, planId, releaseTrain, clusterType, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager()));
+ }
+
+ public Response locationGetWithResponse(String location, String extensionTypeName, Context context) {
+ Response inner
+ = this.serviceClient().locationGetWithResponse(location, extensionTypeName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ExtensionTypeImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ExtensionType locationGet(String location, String extensionTypeName) {
+ ExtensionTypeInner inner = this.serviceClient().locationGet(location, extensionTypeName);
+ if (inner != null) {
+ return new ExtensionTypeImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listVersions(String location, String extensionTypeName) {
+ PagedIterable inner
+ = this.serviceClient().listVersions(location, extensionTypeName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new VersionForReleaseTrainImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listVersions(String location, String extensionTypeName,
+ String releaseTrain, String clusterType, String majorVersion, Boolean showLatest, Context context) {
+ PagedIterable inner = this.serviceClient()
+ .listVersions(location, extensionTypeName, releaseTrain, clusterType, majorVersion, showLatest, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new VersionForReleaseTrainImpl(inner1, this.manager()));
+ }
+
+ public Response getVersionWithResponse(String location, String extensionTypeName,
+ String versionNumber, Context context) {
+ Response inner
+ = this.serviceClient().getVersionWithResponse(location, extensionTypeName, versionNumber, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new VersionForReleaseTrainImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public VersionForReleaseTrain getVersion(String location, String extensionTypeName, String versionNumber) {
+ VersionForReleaseTrainInner inner = this.serviceClient().getVersion(location, extensionTypeName, versionNumber);
+ if (inner != null) {
+ return new VersionForReleaseTrainImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, clusterRp, clusterResourceName, clusterName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String publisherId, String offerId, String planId, String releaseTrain, Context context) {
+ PagedIterable inner = this.serviceClient()
+ .list(resourceGroupName, clusterRp, clusterResourceName, clusterName, publisherId, offerId, planId,
+ releaseTrain, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName,
+ context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ExtensionTypeImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ExtensionType get(String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName,
+ String extensionTypeName) {
+ ExtensionTypeInner inner = this.serviceClient()
+ .get(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName);
+ if (inner != null) {
+ return new ExtensionTypeImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName) {
+ PagedIterable inner = this.serviceClient()
+ .clusterListVersions(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new VersionForReleaseTrainImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String releaseTrain,
+ String majorVersion, Boolean showLatest, Context context) {
+ PagedIterable inner = this.serviceClient()
+ .clusterListVersions(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName,
+ releaseTrain, majorVersion, showLatest, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new VersionForReleaseTrainImpl(inner1, this.manager()));
+ }
+
+ public Response clusterGetVersionWithResponse(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String versionNumber,
+ Context context) {
+ Response inner = this.serviceClient()
+ .clusterGetVersionWithResponse(resourceGroupName, clusterRp, clusterResourceName, clusterName,
+ extensionTypeName, versionNumber, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new VersionForReleaseTrainImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public VersionForReleaseTrain clusterGetVersion(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String versionNumber) {
+ VersionForReleaseTrainInner inner = this.serviceClient()
+ .clusterGetVersion(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionTypeName,
+ versionNumber);
+ if (inner != null) {
+ return new VersionForReleaseTrainImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private ExtensionTypesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesMgmtClientBuilder.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesMgmtClientBuilder.java
new file mode 100644
index 000000000000..42d255386bdb
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesMgmtClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.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 ExtensionTypesMgmtClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { ExtensionTypesMgmtClientImpl.class })
+public final class ExtensionTypesMgmtClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ExtensionTypesMgmtClientBuilder.
+ */
+ public ExtensionTypesMgmtClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ExtensionTypesMgmtClientBuilder.
+ */
+ public ExtensionTypesMgmtClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the ExtensionTypesMgmtClientBuilder.
+ */
+ public ExtensionTypesMgmtClientBuilder 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 ExtensionTypesMgmtClientBuilder.
+ */
+ public ExtensionTypesMgmtClientBuilder 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 ExtensionTypesMgmtClientBuilder.
+ */
+ public ExtensionTypesMgmtClientBuilder 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 ExtensionTypesMgmtClientBuilder.
+ */
+ public ExtensionTypesMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of ExtensionTypesMgmtClientImpl with the provided parameters.
+ *
+ * @return an instance of ExtensionTypesMgmtClientImpl.
+ */
+ public ExtensionTypesMgmtClientImpl 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();
+ ExtensionTypesMgmtClientImpl client = new ExtensionTypesMgmtClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesMgmtClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesMgmtClientImpl.java
new file mode 100644
index 000000000000..40f2cd7de5b1
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ExtensionTypesMgmtClientImpl.java
@@ -0,0 +1,308 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.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.kubernetesconfiguration.extensiontypes.fluent.ExtensionTypesClient;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.ExtensionTypesMgmtClient;
+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 ExtensionTypesMgmtClientImpl type.
+ */
+@ServiceClient(builder = ExtensionTypesMgmtClientBuilder.class)
+public final class ExtensionTypesMgmtClientImpl implements ExtensionTypesMgmtClient {
+ /**
+ * The ID of the target subscription.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * server parameter.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Api Version.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The ExtensionTypesClient object to access its operations.
+ */
+ private final ExtensionTypesClient extensionTypes;
+
+ /**
+ * Gets the ExtensionTypesClient object to access its operations.
+ *
+ * @return the ExtensionTypesClient object.
+ */
+ public ExtensionTypesClient getExtensionTypes() {
+ return this.extensionTypes;
+ }
+
+ /**
+ * Initializes an instance of ExtensionTypesMgmtClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription.
+ * @param endpoint server parameter.
+ */
+ ExtensionTypesMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2024-11-01-preview";
+ this.extensionTypes = new ExtensionTypesClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExtensionTypesMgmtClientImpl.class);
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ResourceManagerUtils.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..e2806b829114
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.implementation;
+
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
+ }
+
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl<>(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux
+ .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/VersionForReleaseTrainImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/VersionForReleaseTrainImpl.java
new file mode 100644
index 000000000000..76ed89a9fffb
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/VersionForReleaseTrainImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.implementation;
+
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.VersionForReleaseTrainInner;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.VersionForReleaseTrain;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models.VersionForReleaseTrainProperties;
+
+public final class VersionForReleaseTrainImpl implements VersionForReleaseTrain {
+ private VersionForReleaseTrainInner innerObject;
+
+ private final com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager serviceManager;
+
+ VersionForReleaseTrainImpl(VersionForReleaseTrainInner innerObject,
+ com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager 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 VersionForReleaseTrainProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public VersionForReleaseTrainInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.ExtensionTypesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/package-info.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/package-info.java
new file mode 100644
index 000000000000..be3efb7377c5
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the implementations for ExtensionTypesMgmtClient.
+ * KubernetesConfiguration Extension Types Client.
+ */
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.implementation;
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ClusterScopeSettings.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ClusterScopeSettings.java
new file mode 100644
index 000000000000..3b68aca93752
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ClusterScopeSettings.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.ClusterScopeSettingsProperties;
+import java.io.IOException;
+
+/**
+ * Extension scope settings.
+ */
+@Fluent
+public final class ClusterScopeSettings extends ProxyResource {
+ /*
+ * Extension scope settings
+ */
+ private ClusterScopeSettingsProperties innerProperties;
+
+ /*
+ * 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 ClusterScopeSettings class.
+ */
+ public ClusterScopeSettings() {
+ }
+
+ /**
+ * Get the innerProperties property: Extension scope settings.
+ *
+ * @return the innerProperties value.
+ */
+ private ClusterScopeSettingsProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the allowMultipleInstances property: Describes if multiple instances of the extension are allowed.
+ *
+ * @return the allowMultipleInstances value.
+ */
+ public Boolean allowMultipleInstances() {
+ return this.innerProperties() == null ? null : this.innerProperties().allowMultipleInstances();
+ }
+
+ /**
+ * Set the allowMultipleInstances property: Describes if multiple instances of the extension are allowed.
+ *
+ * @param allowMultipleInstances the allowMultipleInstances value to set.
+ * @return the ClusterScopeSettings object itself.
+ */
+ public ClusterScopeSettings withAllowMultipleInstances(Boolean allowMultipleInstances) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterScopeSettingsProperties();
+ }
+ this.innerProperties().withAllowMultipleInstances(allowMultipleInstances);
+ return this;
+ }
+
+ /**
+ * Get the defaultReleaseNamespace property: Default extension release namespace.
+ *
+ * @return the defaultReleaseNamespace value.
+ */
+ public String defaultReleaseNamespace() {
+ return this.innerProperties() == null ? null : this.innerProperties().defaultReleaseNamespace();
+ }
+
+ /**
+ * Set the defaultReleaseNamespace property: Default extension release namespace.
+ *
+ * @param defaultReleaseNamespace the defaultReleaseNamespace value to set.
+ * @return the ClusterScopeSettings object itself.
+ */
+ public ClusterScopeSettings withDefaultReleaseNamespace(String defaultReleaseNamespace) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterScopeSettingsProperties();
+ }
+ this.innerProperties().withDefaultReleaseNamespace(defaultReleaseNamespace);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterScopeSettings from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterScopeSettings 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 ClusterScopeSettings.
+ */
+ public static ClusterScopeSettings fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterScopeSettings deserializedClusterScopeSettings = new ClusterScopeSettings();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterScopeSettings.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterScopeSettings.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterScopeSettings.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterScopeSettings.innerProperties = ClusterScopeSettingsProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterScopeSettings;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionType.java
new file mode 100644
index 000000000000..1622e1e072b2
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionType.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.ExtensionTypeInner;
+
+/**
+ * An immutable client-side representation of ExtensionType.
+ */
+public interface ExtensionType {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the properties property: The properties property.
+ *
+ * @return the properties value.
+ */
+ ExtensionTypeProperties properties();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.fluent.models.ExtensionTypeInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ ExtensionTypeInner innerModel();
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypeProperties.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypeProperties.java
new file mode 100644
index 000000000000..38403d2272c0
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypeProperties.java
@@ -0,0 +1,272 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The ExtensionTypeProperties model.
+ */
+@Fluent
+public final class ExtensionTypeProperties implements JsonSerializable {
+ /*
+ * Is this Extension Type a system extension.
+ */
+ private Boolean isSystemExtension;
+
+ /*
+ * Should an identity for this cluster resource be created
+ */
+ private Boolean isManagedIdentityRequired;
+
+ /*
+ * Description of the extension type
+ */
+ private String description;
+
+ /*
+ * Name of the publisher for the Extension Type
+ */
+ private String publisher;
+
+ /*
+ * Plan information only for the Marketplace Extension Type.
+ */
+ private ExtensionTypePropertiesPlanInfo planInfo;
+
+ /*
+ * Cluster Types supported for this Extension Type.
+ */
+ private List supportedClusterTypes;
+
+ /*
+ * Supported Kubernetes Scopes for this Extension Type.
+ */
+ private ExtensionTypePropertiesSupportedScopes supportedScopes;
+
+ /**
+ * Creates an instance of ExtensionTypeProperties class.
+ */
+ public ExtensionTypeProperties() {
+ }
+
+ /**
+ * Get the isSystemExtension property: Is this Extension Type a system extension.
+ *
+ * @return the isSystemExtension value.
+ */
+ public Boolean isSystemExtension() {
+ return this.isSystemExtension;
+ }
+
+ /**
+ * Set the isSystemExtension property: Is this Extension Type a system extension.
+ *
+ * @param isSystemExtension the isSystemExtension value to set.
+ * @return the ExtensionTypeProperties object itself.
+ */
+ public ExtensionTypeProperties withIsSystemExtension(Boolean isSystemExtension) {
+ this.isSystemExtension = isSystemExtension;
+ return this;
+ }
+
+ /**
+ * Get the isManagedIdentityRequired property: Should an identity for this cluster resource be created.
+ *
+ * @return the isManagedIdentityRequired value.
+ */
+ public Boolean isManagedIdentityRequired() {
+ return this.isManagedIdentityRequired;
+ }
+
+ /**
+ * Set the isManagedIdentityRequired property: Should an identity for this cluster resource be created.
+ *
+ * @param isManagedIdentityRequired the isManagedIdentityRequired value to set.
+ * @return the ExtensionTypeProperties object itself.
+ */
+ public ExtensionTypeProperties withIsManagedIdentityRequired(Boolean isManagedIdentityRequired) {
+ this.isManagedIdentityRequired = isManagedIdentityRequired;
+ return this;
+ }
+
+ /**
+ * Get the description property: Description of the extension type.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the extension type.
+ *
+ * @param description the description value to set.
+ * @return the ExtensionTypeProperties object itself.
+ */
+ public ExtensionTypeProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the publisher property: Name of the publisher for the Extension Type.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.publisher;
+ }
+
+ /**
+ * Set the publisher property: Name of the publisher for the Extension Type.
+ *
+ * @param publisher the publisher value to set.
+ * @return the ExtensionTypeProperties object itself.
+ */
+ public ExtensionTypeProperties withPublisher(String publisher) {
+ this.publisher = publisher;
+ return this;
+ }
+
+ /**
+ * Get the planInfo property: Plan information only for the Marketplace Extension Type.
+ *
+ * @return the planInfo value.
+ */
+ public ExtensionTypePropertiesPlanInfo planInfo() {
+ return this.planInfo;
+ }
+
+ /**
+ * Set the planInfo property: Plan information only for the Marketplace Extension Type.
+ *
+ * @param planInfo the planInfo value to set.
+ * @return the ExtensionTypeProperties object itself.
+ */
+ public ExtensionTypeProperties withPlanInfo(ExtensionTypePropertiesPlanInfo planInfo) {
+ this.planInfo = planInfo;
+ return this;
+ }
+
+ /**
+ * Get the supportedClusterTypes property: Cluster Types supported for this Extension Type.
+ *
+ * @return the supportedClusterTypes value.
+ */
+ public List supportedClusterTypes() {
+ return this.supportedClusterTypes;
+ }
+
+ /**
+ * Set the supportedClusterTypes property: Cluster Types supported for this Extension Type.
+ *
+ * @param supportedClusterTypes the supportedClusterTypes value to set.
+ * @return the ExtensionTypeProperties object itself.
+ */
+ public ExtensionTypeProperties withSupportedClusterTypes(List supportedClusterTypes) {
+ this.supportedClusterTypes = supportedClusterTypes;
+ return this;
+ }
+
+ /**
+ * Get the supportedScopes property: Supported Kubernetes Scopes for this Extension Type.
+ *
+ * @return the supportedScopes value.
+ */
+ public ExtensionTypePropertiesSupportedScopes supportedScopes() {
+ return this.supportedScopes;
+ }
+
+ /**
+ * Set the supportedScopes property: Supported Kubernetes Scopes for this Extension Type.
+ *
+ * @param supportedScopes the supportedScopes value to set.
+ * @return the ExtensionTypeProperties object itself.
+ */
+ public ExtensionTypeProperties withSupportedScopes(ExtensionTypePropertiesSupportedScopes supportedScopes) {
+ this.supportedScopes = supportedScopes;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (planInfo() != null) {
+ planInfo().validate();
+ }
+ if (supportedScopes() != null) {
+ supportedScopes().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("isSystemExtension", this.isSystemExtension);
+ jsonWriter.writeBooleanField("isManagedIdentityRequired", this.isManagedIdentityRequired);
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("publisher", this.publisher);
+ jsonWriter.writeJsonField("planInfo", this.planInfo);
+ jsonWriter.writeArrayField("supportedClusterTypes", this.supportedClusterTypes,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("supportedScopes", this.supportedScopes);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtensionTypeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtensionTypeProperties 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 ExtensionTypeProperties.
+ */
+ public static ExtensionTypeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtensionTypeProperties deserializedExtensionTypeProperties = new ExtensionTypeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("isSystemExtension".equals(fieldName)) {
+ deserializedExtensionTypeProperties.isSystemExtension = reader.getNullable(JsonReader::getBoolean);
+ } else if ("isManagedIdentityRequired".equals(fieldName)) {
+ deserializedExtensionTypeProperties.isManagedIdentityRequired
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("description".equals(fieldName)) {
+ deserializedExtensionTypeProperties.description = reader.getString();
+ } else if ("publisher".equals(fieldName)) {
+ deserializedExtensionTypeProperties.publisher = reader.getString();
+ } else if ("planInfo".equals(fieldName)) {
+ deserializedExtensionTypeProperties.planInfo = ExtensionTypePropertiesPlanInfo.fromJson(reader);
+ } else if ("supportedClusterTypes".equals(fieldName)) {
+ List supportedClusterTypes = reader.readArray(reader1 -> reader1.getString());
+ deserializedExtensionTypeProperties.supportedClusterTypes = supportedClusterTypes;
+ } else if ("supportedScopes".equals(fieldName)) {
+ deserializedExtensionTypeProperties.supportedScopes
+ = ExtensionTypePropertiesSupportedScopes.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtensionTypeProperties;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypePropertiesPlanInfo.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypePropertiesPlanInfo.java
new file mode 100644
index 000000000000..28cd670ea184
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypePropertiesPlanInfo.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Plan information only for the Marketplace Extension Type.
+ */
+@Fluent
+public final class ExtensionTypePropertiesPlanInfo implements JsonSerializable {
+ /*
+ * Publisher ID of the Marketplace Extension Type.
+ */
+ private String publisherId;
+
+ /*
+ * Plan ID of the Marketplace Extension Type.
+ */
+ private String planId;
+
+ /*
+ * Offer or Product ID of the Marketplace Extension Type.
+ */
+ private String offerId;
+
+ /**
+ * Creates an instance of ExtensionTypePropertiesPlanInfo class.
+ */
+ public ExtensionTypePropertiesPlanInfo() {
+ }
+
+ /**
+ * Get the publisherId property: Publisher ID of the Marketplace Extension Type.
+ *
+ * @return the publisherId value.
+ */
+ public String publisherId() {
+ return this.publisherId;
+ }
+
+ /**
+ * Set the publisherId property: Publisher ID of the Marketplace Extension Type.
+ *
+ * @param publisherId the publisherId value to set.
+ * @return the ExtensionTypePropertiesPlanInfo object itself.
+ */
+ public ExtensionTypePropertiesPlanInfo withPublisherId(String publisherId) {
+ this.publisherId = publisherId;
+ return this;
+ }
+
+ /**
+ * Get the planId property: Plan ID of the Marketplace Extension Type.
+ *
+ * @return the planId value.
+ */
+ public String planId() {
+ return this.planId;
+ }
+
+ /**
+ * Set the planId property: Plan ID of the Marketplace Extension Type.
+ *
+ * @param planId the planId value to set.
+ * @return the ExtensionTypePropertiesPlanInfo object itself.
+ */
+ public ExtensionTypePropertiesPlanInfo withPlanId(String planId) {
+ this.planId = planId;
+ return this;
+ }
+
+ /**
+ * Get the offerId property: Offer or Product ID of the Marketplace Extension Type.
+ *
+ * @return the offerId value.
+ */
+ public String offerId() {
+ return this.offerId;
+ }
+
+ /**
+ * Set the offerId property: Offer or Product ID of the Marketplace Extension Type.
+ *
+ * @param offerId the offerId value to set.
+ * @return the ExtensionTypePropertiesPlanInfo object itself.
+ */
+ public ExtensionTypePropertiesPlanInfo withOfferId(String offerId) {
+ this.offerId = offerId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("publisherId", this.publisherId);
+ jsonWriter.writeStringField("planId", this.planId);
+ jsonWriter.writeStringField("offerId", this.offerId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtensionTypePropertiesPlanInfo from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtensionTypePropertiesPlanInfo 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 ExtensionTypePropertiesPlanInfo.
+ */
+ public static ExtensionTypePropertiesPlanInfo fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtensionTypePropertiesPlanInfo deserializedExtensionTypePropertiesPlanInfo
+ = new ExtensionTypePropertiesPlanInfo();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("publisherId".equals(fieldName)) {
+ deserializedExtensionTypePropertiesPlanInfo.publisherId = reader.getString();
+ } else if ("planId".equals(fieldName)) {
+ deserializedExtensionTypePropertiesPlanInfo.planId = reader.getString();
+ } else if ("offerId".equals(fieldName)) {
+ deserializedExtensionTypePropertiesPlanInfo.offerId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtensionTypePropertiesPlanInfo;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypePropertiesSupportedScopes.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypePropertiesSupportedScopes.java
new file mode 100644
index 000000000000..36fb95903bd5
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypePropertiesSupportedScopes.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Supported Kubernetes Scopes for this Extension Type.
+ */
+@Fluent
+public final class ExtensionTypePropertiesSupportedScopes
+ implements JsonSerializable {
+ /*
+ * The default scope of the extension type. This scope will be used if the user does not provide a scope while
+ * creating an extension.
+ */
+ private String defaultScope;
+
+ /*
+ * Extension scope settings
+ */
+ private ClusterScopeSettings clusterScopeSettings;
+
+ /**
+ * Creates an instance of ExtensionTypePropertiesSupportedScopes class.
+ */
+ public ExtensionTypePropertiesSupportedScopes() {
+ }
+
+ /**
+ * Get the defaultScope property: The default scope of the extension type. This scope will be used if the user does
+ * not provide a scope while creating an extension.
+ *
+ * @return the defaultScope value.
+ */
+ public String defaultScope() {
+ return this.defaultScope;
+ }
+
+ /**
+ * Set the defaultScope property: The default scope of the extension type. This scope will be used if the user does
+ * not provide a scope while creating an extension.
+ *
+ * @param defaultScope the defaultScope value to set.
+ * @return the ExtensionTypePropertiesSupportedScopes object itself.
+ */
+ public ExtensionTypePropertiesSupportedScopes withDefaultScope(String defaultScope) {
+ this.defaultScope = defaultScope;
+ return this;
+ }
+
+ /**
+ * Get the clusterScopeSettings property: Extension scope settings.
+ *
+ * @return the clusterScopeSettings value.
+ */
+ public ClusterScopeSettings clusterScopeSettings() {
+ return this.clusterScopeSettings;
+ }
+
+ /**
+ * Set the clusterScopeSettings property: Extension scope settings.
+ *
+ * @param clusterScopeSettings the clusterScopeSettings value to set.
+ * @return the ExtensionTypePropertiesSupportedScopes object itself.
+ */
+ public ExtensionTypePropertiesSupportedScopes withClusterScopeSettings(ClusterScopeSettings clusterScopeSettings) {
+ this.clusterScopeSettings = clusterScopeSettings;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (clusterScopeSettings() != null) {
+ clusterScopeSettings().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("defaultScope", this.defaultScope);
+ jsonWriter.writeJsonField("clusterScopeSettings", this.clusterScopeSettings);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtensionTypePropertiesSupportedScopes from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtensionTypePropertiesSupportedScopes 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 ExtensionTypePropertiesSupportedScopes.
+ */
+ public static ExtensionTypePropertiesSupportedScopes fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtensionTypePropertiesSupportedScopes deserializedExtensionTypePropertiesSupportedScopes
+ = new ExtensionTypePropertiesSupportedScopes();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("defaultScope".equals(fieldName)) {
+ deserializedExtensionTypePropertiesSupportedScopes.defaultScope = reader.getString();
+ } else if ("clusterScopeSettings".equals(fieldName)) {
+ deserializedExtensionTypePropertiesSupportedScopes.clusterScopeSettings
+ = ClusterScopeSettings.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtensionTypePropertiesSupportedScopes;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypeVersionsList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypeVersionsList.java
new file mode 100644
index 000000000000..dfff3494a4db
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypeVersionsList.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.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.kubernetesconfiguration.extensiontypes.fluent.models.VersionForReleaseTrainInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * List Extension Type Versions. It contains a list of ExtensionTypeVersionForReleaseTrain objects.
+ */
+@Immutable
+public final class ExtensionTypeVersionsList implements JsonSerializable {
+ /*
+ * List of Extension Type Versions for an Extension Type in a Release Train.
+ */
+ private List value;
+
+ /*
+ * URL to get the next set of extension objects, if any.
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of ExtensionTypeVersionsList class.
+ */
+ public ExtensionTypeVersionsList() {
+ }
+
+ /**
+ * Get the value property: List of Extension Type Versions for an Extension Type in a Release Train.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: URL to get the next set of extension objects, if any.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtensionTypeVersionsList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtensionTypeVersionsList 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 ExtensionTypeVersionsList.
+ */
+ public static ExtensionTypeVersionsList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtensionTypeVersionsList deserializedExtensionTypeVersionsList = new ExtensionTypeVersionsList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> VersionForReleaseTrainInner.fromJson(reader1));
+ deserializedExtensionTypeVersionsList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedExtensionTypeVersionsList.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtensionTypeVersionsList;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypes.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypes.java
new file mode 100644
index 000000000000..2dccaf1b2933
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypes.java
@@ -0,0 +1,284 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of ExtensionTypes.
+ */
+public interface ExtensionTypes {
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable locationList(String location);
+
+ /**
+ * List all Extension Types for the location.
+ *
+ * @param location The name of Azure region.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable locationList(String location, String publisherId, String offerId, String planId,
+ String releaseTrain, String clusterType, Context context);
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location along with {@link Response}.
+ */
+ Response locationGetWithResponse(String location, String extensionTypeName, Context context);
+
+ /**
+ * Get an extension type for the location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an extension type for the location.
+ */
+ ExtensionType locationGet(String location, String extensionTypeName);
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable listVersions(String location, String extensionTypeName);
+
+ /**
+ * List the versions for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param clusterType Filter results by the cluster type for extension types.
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable listVersions(String location, String extensionTypeName, String releaseTrain,
+ String clusterType, String majorVersion, Boolean showLatest, Context context);
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an extension type and location along with {@link Response}.
+ */
+ Response getVersionWithResponse(String location, String extensionTypeName,
+ String versionNumber, Context context);
+
+ /**
+ * Get details of a version for an extension type and location.
+ *
+ * @param location The name of Azure region.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an extension type and location.
+ */
+ VersionForReleaseTrain getVersion(String location, String extensionTypeName, String versionNumber);
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName);
+
+ /**
+ * List installable Extension Types for the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param publisherId Filter results by Publisher ID of a marketplace extension type.
+ * @param offerId Filter results by Offer or Product ID of a marketplace extension type.
+ * @param planId Filter results by Plan ID of a marketplace extension type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @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 list Extension Types as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String publisherId, String offerId, String planId, String releaseTrain, Context context);
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster along with
+ * {@link Response}.
+ */
+ Response getWithResponse(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String extensionTypeName, Context context);
+
+ /**
+ * Get an Extension Type installable to the cluster based region and type for the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Extension Type installable to the cluster based region and type for the cluster.
+ */
+ ExtensionType get(String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName,
+ String extensionTypeName);
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName);
+
+ /**
+ * List the version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param releaseTrain Filter results by release train (default value is stable).
+ * @param majorVersion Filter results by the major version of an extension type.
+ * @param showLatest Filter results by only the latest version (based on other query parameters).
+ * @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 list Extension Type Versions as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable clusterListVersions(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String releaseTrain,
+ String majorVersion, Boolean showLatest, Context context);
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an Extension Type installable to the cluster along with {@link Response}.
+ */
+ Response clusterGetVersionWithResponse(String resourceGroupName, String clusterRp,
+ String clusterResourceName, String clusterName, String extensionTypeName, String versionNumber,
+ Context context);
+
+ /**
+ * Get details of a version for an Extension Type installable to the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,
+ * Microsoft.HybridContainerService.
+ * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,
+ * provisionedClusters, appliances.
+ * @param clusterName The name of the kubernetes cluster.
+ * @param extensionTypeName Name of the Extension Type.
+ * @param versionNumber Version number of the Extension Type.
+ * @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 details of a version for an Extension Type installable to the cluster.
+ */
+ VersionForReleaseTrain clusterGetVersion(String resourceGroupName, String clusterRp, String clusterResourceName,
+ String clusterName, String extensionTypeName, String versionNumber);
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypesList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypesList.java
new file mode 100644
index 000000000000..bf0cb454d6e7
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/ExtensionTypesList.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.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.kubernetesconfiguration.extensiontypes.fluent.models.ExtensionTypeInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * List Extension Types. It contains a list of ExtensionType objects and a URL link to get the next set of results.
+ */
+@Immutable
+public final class ExtensionTypesList implements JsonSerializable {
+ /*
+ * List of Extension Types.
+ */
+ private List value;
+
+ /*
+ * URL to get the next set of extension type objects, if any.
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of ExtensionTypesList class.
+ */
+ public ExtensionTypesList() {
+ }
+
+ /**
+ * Get the value property: List of Extension Types.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: URL to get the next set of extension type objects, if any.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExtensionTypesList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExtensionTypesList 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 ExtensionTypesList.
+ */
+ public static ExtensionTypesList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExtensionTypesList deserializedExtensionTypesList = new ExtensionTypesList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ExtensionTypeInner.fromJson(reader1));
+ deserializedExtensionTypesList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedExtensionTypesList.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExtensionTypesList;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/UnsupportedKubernetesMatrixItem.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/UnsupportedKubernetesMatrixItem.java
new file mode 100644
index 000000000000..e61d93dfd02e
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/UnsupportedKubernetesMatrixItem.java
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The list of Kubernetes Distribution and Versions that are not supported by this version of this Extension Type.
+ */
+@Fluent
+public final class UnsupportedKubernetesMatrixItem implements JsonSerializable {
+ /*
+ * The list of Kubernetes Cluster Distribution Names not supported
+ */
+ private List distributions;
+
+ /*
+ * The list of Kubernetes Versions not supported by the list of Kubernetes Cluster Distribution names in this object
+ */
+ private List unsupportedVersions;
+
+ /**
+ * Creates an instance of UnsupportedKubernetesMatrixItem class.
+ */
+ public UnsupportedKubernetesMatrixItem() {
+ }
+
+ /**
+ * Get the distributions property: The list of Kubernetes Cluster Distribution Names not supported.
+ *
+ * @return the distributions value.
+ */
+ public List distributions() {
+ return this.distributions;
+ }
+
+ /**
+ * Set the distributions property: The list of Kubernetes Cluster Distribution Names not supported.
+ *
+ * @param distributions the distributions value to set.
+ * @return the UnsupportedKubernetesMatrixItem object itself.
+ */
+ public UnsupportedKubernetesMatrixItem withDistributions(List distributions) {
+ this.distributions = distributions;
+ return this;
+ }
+
+ /**
+ * Get the unsupportedVersions property: The list of Kubernetes Versions not supported by the list of Kubernetes
+ * Cluster Distribution names in this object.
+ *
+ * @return the unsupportedVersions value.
+ */
+ public List unsupportedVersions() {
+ return this.unsupportedVersions;
+ }
+
+ /**
+ * Set the unsupportedVersions property: The list of Kubernetes Versions not supported by the list of Kubernetes
+ * Cluster Distribution names in this object.
+ *
+ * @param unsupportedVersions the unsupportedVersions value to set.
+ * @return the UnsupportedKubernetesMatrixItem object itself.
+ */
+ public UnsupportedKubernetesMatrixItem withUnsupportedVersions(List unsupportedVersions) {
+ this.unsupportedVersions = unsupportedVersions;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("distributions", this.distributions,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeArrayField("unsupportedVersions", this.unsupportedVersions,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of UnsupportedKubernetesMatrixItem from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of UnsupportedKubernetesMatrixItem 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 UnsupportedKubernetesMatrixItem.
+ */
+ public static UnsupportedKubernetesMatrixItem fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ UnsupportedKubernetesMatrixItem deserializedUnsupportedKubernetesMatrixItem
+ = new UnsupportedKubernetesMatrixItem();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("distributions".equals(fieldName)) {
+ List distributions = reader.readArray(reader1 -> reader1.getString());
+ deserializedUnsupportedKubernetesMatrixItem.distributions = distributions;
+ } else if ("unsupportedVersions".equals(fieldName)) {
+ List unsupportedVersions = reader.readArray(reader1 -> reader1.getString());
+ deserializedUnsupportedKubernetesMatrixItem.unsupportedVersions = unsupportedVersions;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedUnsupportedKubernetesMatrixItem;
+ });
+ }
+}
diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/UnsupportedKubernetesVersions.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/UnsupportedKubernetesVersions.java
new file mode 100644
index 000000000000..78483beebcdf
--- /dev/null
+++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration-extensiontypes/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/extensiontypes/models/UnsupportedKubernetesVersions.java
@@ -0,0 +1,203 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.kubernetesconfiguration.extensiontypes.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The list of supported Kubernetes cluster versions for this extension type.
+ */
+@Fluent
+public final class UnsupportedKubernetesVersions implements JsonSerializable {
+ /*
+ * The connectedCluster property.
+ */
+ private List connectedCluster;
+
+ /*
+ * The appliances property.
+ */
+ private List appliances;
+
+ /*
+ * The provisionedCluster property.
+ */
+ private List provisionedCluster;
+
+ /*
+ * The managedCluster property.
+ */
+ private List managedCluster;
+
+ /**
+ * Creates an instance of UnsupportedKubernetesVersions class.
+ */
+ public UnsupportedKubernetesVersions() {
+ }
+
+ /**
+ * Get the connectedCluster property: The connectedCluster property.
+ *
+ * @return the connectedCluster value.
+ */
+ public List connectedCluster() {
+ return this.connectedCluster;
+ }
+
+ /**
+ * Set the connectedCluster property: The connectedCluster property.
+ *
+ * @param connectedCluster the connectedCluster value to set.
+ * @return the UnsupportedKubernetesVersions object itself.
+ */
+ public UnsupportedKubernetesVersions withConnectedCluster(List connectedCluster) {
+ this.connectedCluster = connectedCluster;
+ return this;
+ }
+
+ /**
+ * Get the appliances property: The appliances property.
+ *
+ * @return the appliances value.
+ */
+ public List appliances() {
+ return this.appliances;
+ }
+
+ /**
+ * Set the appliances property: The appliances property.
+ *
+ * @param appliances the appliances value to set.
+ * @return the UnsupportedKubernetesVersions object itself.
+ */
+ public UnsupportedKubernetesVersions withAppliances(List appliances) {
+ this.appliances = appliances;
+ return this;
+ }
+
+ /**
+ * Get the provisionedCluster property: The provisionedCluster property.
+ *
+ * @return the provisionedCluster value.
+ */
+ public List provisionedCluster() {
+ return this.provisionedCluster;
+ }
+
+ /**
+ * Set the provisionedCluster property: The provisionedCluster property.
+ *
+ * @param provisionedCluster the provisionedCluster value to set.
+ * @return the UnsupportedKubernetesVersions object itself.
+ */
+ public UnsupportedKubernetesVersions
+ withProvisionedCluster(List