generatePasswordWithResponse(
- String resourceGroupName, String clusterName, String arcSettingName, Context context) {
- return generatePasswordWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context).block();
+ public PasswordCredentialInner generatePassword(
+ String resourceGroupName, String clusterName, String arcSettingName) {
+ return generatePasswordWithResponse(resourceGroupName, clusterName, arcSettingName, Context.NONE).getValue();
}
/**
@@ -1574,7 +1574,8 @@ public ArcIdentityResponseInner createIdentity(
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1610,7 +1611,8 @@ private Mono> listByClusterNextSinglePageAsync(St
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java
index e7fc8d055b32..82252170e9c4 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java
@@ -42,15 +42,6 @@ public PagedIterable listByCluster(String resourceGroupName, String
return Utils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager()));
}
- public ArcSetting get(String resourceGroupName, String clusterName, String arcSettingName) {
- ArcSettingInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName);
- if (inner != null) {
- return new ArcSettingImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String clusterName, String arcSettingName, Context context) {
Response inner =
@@ -66,6 +57,15 @@ public Response getWithResponse(
}
}
+ public ArcSetting get(String resourceGroupName, String clusterName, String arcSettingName) {
+ ArcSettingInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName);
+ if (inner != null) {
+ return new ArcSettingImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void delete(String resourceGroupName, String clusterName, String arcSettingName) {
this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName);
}
@@ -74,16 +74,6 @@ public void delete(String resourceGroupName, String clusterName, String arcSetti
this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, context);
}
- public PasswordCredential generatePassword(String resourceGroupName, String clusterName, String arcSettingName) {
- PasswordCredentialInner inner =
- this.serviceClient().generatePassword(resourceGroupName, clusterName, arcSettingName);
- if (inner != null) {
- return new PasswordCredentialImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response generatePasswordWithResponse(
String resourceGroupName, String clusterName, String arcSettingName, Context context) {
Response inner =
@@ -99,6 +89,16 @@ public Response generatePasswordWithResponse(
}
}
+ public PasswordCredential generatePassword(String resourceGroupName, String clusterName, String arcSettingName) {
+ PasswordCredentialInner inner =
+ this.serviceClient().generatePassword(resourceGroupName, clusterName, arcSettingName);
+ if (inner != null) {
+ return new PasswordCredentialImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public ArcIdentityResponse createIdentity(String resourceGroupName, String clusterName, String arcSettingName) {
ArcIdentityResponseInner inner =
this.serviceClient().createIdentity(resourceGroupName, clusterName, arcSettingName);
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java
index 31e4c5141f02..a68487f0b8c2 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java
@@ -119,24 +119,26 @@ public AzureStackHciClientBuilder serializerAdapter(SerializerAdapter serializer
* @return an instance of AzureStackHciClientImpl.
*/
public AzureStackHciClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (pipeline == null) {
- this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ 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();
AzureStackHciClientImpl client =
new AzureStackHciClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
index 773a2426d48d..01a92367b6e0 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java
@@ -26,7 +26,13 @@
import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient;
import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient;
import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.OffersClient;
import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.PublishersClient;
+import com.azure.resourcemanager.azurestackhci.fluent.SkusClient;
+import com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient;
+import com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -159,6 +165,78 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /** The OffersClient object to access its operations. */
+ private final OffersClient offers;
+
+ /**
+ * Gets the OffersClient object to access its operations.
+ *
+ * @return the OffersClient object.
+ */
+ public OffersClient getOffers() {
+ return this.offers;
+ }
+
+ /** The PublishersClient object to access its operations. */
+ private final PublishersClient publishers;
+
+ /**
+ * Gets the PublishersClient object to access its operations.
+ *
+ * @return the PublishersClient object.
+ */
+ public PublishersClient getPublishers() {
+ return this.publishers;
+ }
+
+ /** The SkusClient object to access its operations. */
+ private final SkusClient skus;
+
+ /**
+ * Gets the SkusClient object to access its operations.
+ *
+ * @return the SkusClient object.
+ */
+ public SkusClient getSkus() {
+ return this.skus;
+ }
+
+ /** The UpdateRunsClient object to access its operations. */
+ private final UpdateRunsClient updateRuns;
+
+ /**
+ * Gets the UpdateRunsClient object to access its operations.
+ *
+ * @return the UpdateRunsClient object.
+ */
+ public UpdateRunsClient getUpdateRuns() {
+ return this.updateRuns;
+ }
+
+ /** The UpdateSummariesOperationsClient object to access its operations. */
+ private final UpdateSummariesOperationsClient updateSummariesOperations;
+
+ /**
+ * Gets the UpdateSummariesOperationsClient object to access its operations.
+ *
+ * @return the UpdateSummariesOperationsClient object.
+ */
+ public UpdateSummariesOperationsClient getUpdateSummariesOperations() {
+ return this.updateSummariesOperations;
+ }
+
+ /** The UpdatesClient object to access its operations. */
+ private final UpdatesClient updates;
+
+ /**
+ * Gets the UpdatesClient object to access its operations.
+ *
+ * @return the UpdatesClient object.
+ */
+ public UpdatesClient getUpdates() {
+ return this.updates;
+ }
+
/**
* Initializes an instance of AzureStackHciClient client.
*
@@ -181,11 +259,17 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2022-05-01";
+ this.apiVersion = "2022-10-01";
this.arcSettings = new ArcSettingsClientImpl(this);
this.clusters = new ClustersClientImpl(this);
this.extensions = new ExtensionsClientImpl(this);
this.operations = new OperationsClientImpl(this);
+ this.offers = new OffersClientImpl(this);
+ this.publishers = new PublishersClientImpl(this);
+ this.skus = new SkusClientImpl(this);
+ this.updateRuns = new UpdateRunsClientImpl(this);
+ this.updateSummariesOperations = new UpdateSummariesOperationsClientImpl(this);
+ this.updates = new UpdatesClientImpl(this);
}
/**
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
index 3bb9fccdd06c..a31c3c831326 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java
@@ -13,12 +13,17 @@
import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse;
import com.azure.resourcemanager.azurestackhci.models.ClusterPatch;
import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties;
+import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.azurestackhci.models.ProvisioningState;
+import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest;
+import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties;
import com.azure.resourcemanager.azurestackhci.models.Status;
import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest;
+import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.Map;
+import java.util.UUID;
public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update {
private ClusterInner innerObject;
@@ -54,6 +59,27 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
+ public UUID principalId() {
+ return this.innerModel().principalId();
+ }
+
+ public UUID tenantId() {
+ return this.innerModel().tenantId();
+ }
+
+ public ManagedServiceIdentityType typeIdentityType() {
+ return this.innerModel().typeIdentityType();
+ }
+
+ public Map userAssignedIdentities() {
+ Map inner = this.innerModel().userAssignedIdentities();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
public ProvisioningState provisioningState() {
return this.innerModel().provisioningState();
}
@@ -86,6 +112,10 @@ public String aadServicePrincipalObjectId() {
return this.innerModel().aadServicePrincipalObjectId();
}
+ public SoftwareAssuranceProperties softwareAssuranceProperties() {
+ return this.innerModel().softwareAssuranceProperties();
+ }
+
public ClusterDesiredProperties desiredProperties() {
return this.innerModel().desiredProperties();
}
@@ -243,6 +273,19 @@ public ClusterIdentityResponse createIdentity(Context context) {
return serviceManager.clusters().createIdentity(resourceGroupName, clusterName, context);
}
+ public Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) {
+ return serviceManager
+ .clusters()
+ .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest);
+ }
+
+ public Cluster extendSoftwareAssuranceBenefit(
+ SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) {
+ return serviceManager
+ .clusters()
+ .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest, context);
+ }
+
public ClusterImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -263,6 +306,21 @@ public ClusterImpl withTags(Map tags) {
}
}
+ public ClusterImpl withTypeIdentityType(ManagedServiceIdentityType typeIdentityType) {
+ this.innerModel().withTypeIdentityType(typeIdentityType);
+ return this;
+ }
+
+ public ClusterImpl withUserAssignedIdentities(Map userAssignedIdentities) {
+ if (isInCreateMode()) {
+ this.innerModel().withUserAssignedIdentities(userAssignedIdentities);
+ return this;
+ } else {
+ this.updateCluster.withUserAssignedIdentities(userAssignedIdentities);
+ return this;
+ }
+ }
+
public ClusterImpl withCloudManagementEndpoint(String cloudManagementEndpoint) {
if (isInCreateMode()) {
this.innerModel().withCloudManagementEndpoint(cloudManagementEndpoint);
@@ -303,6 +361,11 @@ public ClusterImpl withAadServicePrincipalObjectId(String aadServicePrincipalObj
return this;
}
+ public ClusterImpl withSoftwareAssuranceProperties(SoftwareAssuranceProperties softwareAssuranceProperties) {
+ this.innerModel().withSoftwareAssuranceProperties(softwareAssuranceProperties);
+ return this;
+ }
+
public ClusterImpl withDesiredProperties(ClusterDesiredProperties desiredProperties) {
if (isInCreateMode()) {
this.innerModel().withDesiredProperties(desiredProperties);
@@ -313,6 +376,11 @@ public ClusterImpl withDesiredProperties(ClusterDesiredProperties desiredPropert
}
}
+ public ClusterImpl withType(ManagedServiceIdentityType type) {
+ this.updateCluster.withType(type);
+ return this;
+ }
+
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java
index d04da2f86403..eef8a6fb6421 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java
@@ -38,6 +38,7 @@
import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner;
import com.azure.resourcemanager.azurestackhci.models.ClusterList;
import com.azure.resourcemanager.azurestackhci.models.ClusterPatch;
+import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest;
import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
@@ -186,6 +187,22 @@ Mono>> createIdentity(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/extendSoftwareAssuranceBenefit")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> extendSoftwareAssuranceBenefit(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -626,14 +643,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the cluster.
+ * @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 hCI cluster.
+ * @return hCI cluster along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) {
- return getByResourceGroupAsync(resourceGroupName, clusterName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block();
}
/**
@@ -641,16 +660,14 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the cluster.
- * @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 hCI cluster along with {@link Response}.
+ * @return hCI cluster.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String clusterName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block();
+ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
}
/**
@@ -784,14 +801,16 @@ private Mono createAsync(String resourceGroupName, String clusterN
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the cluster.
* @param cluster Details of the HCI cluster.
+ * @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 cluster details.
+ * @return cluster details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner cluster) {
- return createAsync(resourceGroupName, clusterName, cluster).block();
+ public Response createWithResponse(
+ String resourceGroupName, String clusterName, ClusterInner cluster, Context context) {
+ return createWithResponseAsync(resourceGroupName, clusterName, cluster, context).block();
}
/**
@@ -800,16 +819,14 @@ public ClusterInner create(String resourceGroupName, String clusterName, Cluster
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the cluster.
* @param cluster Details of the HCI cluster.
- * @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 cluster details along with {@link Response}.
+ * @return cluster details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createWithResponse(
- String resourceGroupName, String clusterName, ClusterInner cluster, Context context) {
- return createWithResponseAsync(resourceGroupName, clusterName, cluster, context).block();
+ public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner cluster) {
+ return createWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue();
}
/**
@@ -943,14 +960,16 @@ private Mono updateAsync(String resourceGroupName, String clusterN
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the cluster.
* @param cluster Details of the HCI cluster.
+ * @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 cluster details.
+ * @return cluster details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster) {
- return updateAsync(resourceGroupName, clusterName, cluster).block();
+ public Response updateWithResponse(
+ String resourceGroupName, String clusterName, ClusterPatch cluster, Context context) {
+ return updateWithResponseAsync(resourceGroupName, clusterName, cluster, context).block();
}
/**
@@ -959,16 +978,14 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the cluster.
* @param cluster Details of the HCI cluster.
- * @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 cluster details along with {@link Response}.
+ * @return cluster details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
- String resourceGroupName, String clusterName, ClusterPatch cluster, Context context) {
- return updateWithResponseAsync(resourceGroupName, clusterName, cluster, context).block();
+ public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster) {
+ return updateWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue();
}
/**
@@ -1723,10 +1740,304 @@ public ClusterIdentityResponseInner createIdentity(String resourceGroupName, Str
return createIdentityAsync(resourceGroupName, clusterName, context).block();
}
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cluster details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> extendSoftwareAssuranceBenefitWithResponseAsync(
+ String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (softwareAssuranceChangeRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter softwareAssuranceChangeRequest is required and cannot be null."));
+ } else {
+ softwareAssuranceChangeRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .extendSoftwareAssuranceBenefit(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ softwareAssuranceChangeRequest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @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 cluster details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> extendSoftwareAssuranceBenefitWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (softwareAssuranceChangeRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter softwareAssuranceChangeRequest is required and cannot be null."));
+ } else {
+ softwareAssuranceChangeRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .extendSoftwareAssuranceBenefit(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ softwareAssuranceChangeRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterInner> beginExtendSoftwareAssuranceBenefitAsync(
+ String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) {
+ Mono>> mono =
+ extendSoftwareAssuranceBenefitWithResponseAsync(
+ resourceGroupName, clusterName, softwareAssuranceChangeRequest);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext());
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterInner> beginExtendSoftwareAssuranceBenefitAsync(
+ String resourceGroupName,
+ String clusterName,
+ SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ extendSoftwareAssuranceBenefitWithResponseAsync(
+ resourceGroupName, clusterName, softwareAssuranceChangeRequest, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context);
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit(
+ String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) {
+ return beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest)
+ .getSyncPoller();
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit(
+ String resourceGroupName,
+ String clusterName,
+ SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest,
+ Context context) {
+ return beginExtendSoftwareAssuranceBenefitAsync(
+ resourceGroupName, clusterName, softwareAssuranceChangeRequest, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cluster details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono extendSoftwareAssuranceBenefitAsync(
+ String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) {
+ return beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @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 cluster details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono extendSoftwareAssuranceBenefitAsync(
+ String resourceGroupName,
+ String clusterName,
+ SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest,
+ Context context) {
+ return beginExtendSoftwareAssuranceBenefitAsync(
+ resourceGroupName, clusterName, softwareAssuranceChangeRequest, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner extendSoftwareAssuranceBenefit(
+ String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) {
+ return extendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest)
+ .block();
+ }
+
+ /**
+ * Extends Software Assurance Benefit to a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload.
+ * @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 cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner extendSoftwareAssuranceBenefit(
+ String resourceGroupName,
+ String clusterName,
+ SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest,
+ Context context) {
+ return extendSoftwareAssuranceBenefitAsync(
+ resourceGroupName, clusterName, softwareAssuranceChangeRequest, context)
+ .block();
+ }
+
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1762,7 +2073,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -1798,7 +2110,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1834,7 +2147,8 @@ private Mono> listByResourceGroupNextSinglePageAsync
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
index 980c49de2240..e7b6926116dd 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java
@@ -15,6 +15,7 @@
import com.azure.resourcemanager.azurestackhci.models.Cluster;
import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse;
import com.azure.resourcemanager.azurestackhci.models.Clusters;
+import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest;
import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest;
public final class ClustersImpl implements Clusters {
@@ -50,15 +51,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Cont
return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
- public Cluster getByResourceGroup(String resourceGroupName, String clusterName) {
- ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName);
- if (inner != null) {
- return new ClusterImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getByResourceGroupWithResponse(
String resourceGroupName, String clusterName, Context context) {
Response inner =
@@ -74,6 +66,15 @@ public Response getByResourceGroupWithResponse(
}
}
+ public Cluster getByResourceGroup(String resourceGroupName, String clusterName) {
+ ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName);
+ if (inner != null) {
+ return new ClusterImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void deleteByResourceGroup(String resourceGroupName, String clusterName) {
this.serviceClient().delete(resourceGroupName, clusterName);
}
@@ -114,6 +115,36 @@ public ClusterIdentityResponse createIdentity(String resourceGroupName, String c
}
}
+ public Cluster extendSoftwareAssuranceBenefit(
+ String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) {
+ ClusterInner inner =
+ this
+ .serviceClient()
+ .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest);
+ if (inner != null) {
+ return new ClusterImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Cluster extendSoftwareAssuranceBenefit(
+ String resourceGroupName,
+ String clusterName,
+ SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest,
+ Context context) {
+ ClusterInner inner =
+ this
+ .serviceClient()
+ .extendSoftwareAssuranceBenefit(
+ resourceGroupName, clusterName, softwareAssuranceChangeRequest, context);
+ if (inner != null) {
+ return new ClusterImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public Cluster getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java
index ea047f5486e1..d040286f3d5c 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java
@@ -502,15 +502,16 @@ private Mono getAsync(
* @param clusterName The name of the cluster.
* @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
* @param extensionName The name of the machine extension.
+ * @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 particular Arc Extension of HCI Cluster.
+ * @return particular Arc Extension of HCI Cluster along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ExtensionInner get(
- String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
- return getAsync(resourceGroupName, clusterName, arcSettingName, extensionName).block();
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block();
}
/**
@@ -520,16 +521,15 @@ public ExtensionInner get(
* @param clusterName The name of the cluster.
* @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
* @param extensionName The name of the machine extension.
- * @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 particular Arc Extension of HCI Cluster along with {@link Response}.
+ * @return particular Arc Extension of HCI Cluster.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
- return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block();
+ public ExtensionInner get(
+ String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ return getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE).getValue();
}
/**
@@ -1512,7 +1512,8 @@ public void delete(
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1548,7 +1549,8 @@ private Mono> listByArcSettingNextSinglePageAsync(
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java
index a2ed71822024..040aa8b494d3 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java
@@ -41,15 +41,6 @@ public PagedIterable listByArcSetting(
return Utils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager()));
}
- public Extension get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
- ExtensionInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName, extensionName);
- if (inner != null) {
- return new ExtensionImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(
String resourceGroupName, String clusterName, String arcSettingName, String extensionName, Context context) {
Response inner =
@@ -67,6 +58,15 @@ public Response getWithResponse(
}
}
+ public Extension get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
+ ExtensionInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName, extensionName);
+ if (inner != null) {
+ return new ExtensionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) {
this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, extensionName);
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java
new file mode 100644
index 000000000000..2b1ebff07b91
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner;
+import com.azure.resourcemanager.azurestackhci.models.Offer;
+import com.azure.resourcemanager.azurestackhci.models.SkuMappings;
+import java.util.Collections;
+import java.util.List;
+
+public final class OfferImpl implements Offer {
+ private OfferInner innerObject;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ OfferImpl(OfferInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager 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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String publisherId() {
+ return this.innerModel().publisherId();
+ }
+
+ public String content() {
+ return this.innerModel().content();
+ }
+
+ public String contentVersion() {
+ return this.innerModel().contentVersion();
+ }
+
+ public List skuMappings() {
+ List inner = this.innerModel().skuMappings();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public OfferInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java
new file mode 100644
index 000000000000..ca21f80e99fd
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java
@@ -0,0 +1,916 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.azurestackhci.fluent.OffersClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner;
+import com.azure.resourcemanager.azurestackhci.models.OfferList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OffersClient. */
+public final class OffersClientImpl implements OffersClient {
+ /** The proxy service used to perform REST calls. */
+ private final OffersService service;
+
+ /** The service client containing this operation class. */
+ private final AzureStackHciClientImpl client;
+
+ /**
+ * Initializes an instance of OffersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OffersClientImpl(AzureStackHciClientImpl client) {
+ this.service = RestProxy.create(OffersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureStackHciClientOffers to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureStackHciClientO")
+ private interface OffersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/publishers/{publisherName}/offers")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByPublisher(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("publisherName") String publisherName,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/offers")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCluster(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("publisherName") String publisherName,
+ @PathParam("offerName") String offerName,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByPublisherNext(
+ @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> listByClusterNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List Offers available for a publisher within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPublisherSinglePageAsync(
+ String resourceGroupName, String clusterName, String publisherName, String expand) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByPublisher(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ this.client.getApiVersion(),
+ expand,
+ 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 Offers available for a publisher within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPublisherSinglePageAsync(
+ String resourceGroupName, String clusterName, String publisherName, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByPublisher(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ this.client.getApiVersion(),
+ expand,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Offers available for a publisher within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByPublisherAsync(
+ String resourceGroupName, String clusterName, String publisherName, String expand) {
+ return new PagedFlux<>(
+ () -> listByPublisherSinglePageAsync(resourceGroupName, clusterName, publisherName, expand),
+ nextLink -> listByPublisherNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offers available for a publisher within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI 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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByPublisherAsync(
+ String resourceGroupName, String clusterName, String publisherName) {
+ final String expand = null;
+ return new PagedFlux<>(
+ () -> listByPublisherSinglePageAsync(resourceGroupName, clusterName, publisherName, expand),
+ nextLink -> listByPublisherNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offers available for a publisher within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByPublisherAsync(
+ String resourceGroupName, String clusterName, String publisherName, String expand, Context context) {
+ return new PagedFlux<>(
+ () -> listByPublisherSinglePageAsync(resourceGroupName, clusterName, publisherName, expand, context),
+ nextLink -> listByPublisherNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Offers available for a publisher within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI 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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByPublisher(
+ String resourceGroupName, String clusterName, String publisherName) {
+ final String expand = null;
+ return new PagedIterable<>(listByPublisherAsync(resourceGroupName, clusterName, publisherName, expand));
+ }
+
+ /**
+ * List Offers available for a publisher within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByPublisher(
+ String resourceGroupName, String clusterName, String publisherName, String expand, Context context) {
+ return new PagedIterable<>(
+ listByPublisherAsync(resourceGroupName, clusterName, publisherName, expand, context));
+ }
+
+ /**
+ * List Offers available across publishers for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName, String expand) {
+ 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 (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
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ expand,
+ 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 Offers available across publishers for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName, String expand, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ expand,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Offers available across publishers for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, String expand) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offers available across publishers for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the 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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) {
+ final String expand = null;
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offers available across publishers for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(
+ String resourceGroupName, String clusterName, String expand, Context context) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand, context),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Offers available across publishers for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the 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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ final String expand = null;
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, expand));
+ }
+
+ /**
+ * List Offers available across publishers for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(
+ String resourceGroupName, String clusterName, String expand, Context context) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, expand, context));
+ }
+
+ /**
+ * Get Offer resource details within a publisher of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return offer resource details within a publisher of HCI Cluster along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String publisherName, String offerName, String expand) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ if (offerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ offerName,
+ this.client.getApiVersion(),
+ expand,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get Offer resource details within a publisher of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 offer resource details within a publisher of HCI Cluster along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ if (offerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ offerName,
+ this.client.getApiVersion(),
+ expand,
+ accept,
+ context);
+ }
+
+ /**
+ * Get Offer resource details within a publisher of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI 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 offer resource details within a publisher of HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String clusterName, String publisherName, String offerName) {
+ final String expand = null;
+ return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, expand)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get Offer resource details within a publisher of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 offer resource details within a publisher of HCI Cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String expand,
+ Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context).block();
+ }
+
+ /**
+ * Get Offer resource details within a publisher of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI 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 offer resource details within a publisher of HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OfferInner get(String resourceGroupName, String clusterName, String publisherName, String offerName) {
+ final String expand = null;
+ return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPublisherNextSinglePageAsync(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.listByPublisherNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByPublisherNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByPublisherNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ 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
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(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.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java
new file mode 100644
index 000000000000..fdb94afa2aad
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.OffersClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner;
+import com.azure.resourcemanager.azurestackhci.models.Offer;
+import com.azure.resourcemanager.azurestackhci.models.Offers;
+
+public final class OffersImpl implements Offers {
+ private static final ClientLogger LOGGER = new ClientLogger(OffersImpl.class);
+
+ private final OffersClient innerClient;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public OffersImpl(
+ OffersClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName) {
+ PagedIterable inner =
+ this.serviceClient().listByPublisher(resourceGroupName, clusterName, publisherName);
+ return Utils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByPublisher(
+ String resourceGroupName, String clusterName, String publisherName, String expand, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByPublisher(resourceGroupName, clusterName, publisherName, expand, context);
+ return Utils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName);
+ return Utils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByCluster(
+ String resourceGroupName, String clusterName, String expand, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByCluster(resourceGroupName, clusterName, expand, context);
+ return Utils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String expand,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new OfferImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Offer get(String resourceGroupName, String clusterName, String publisherName, String offerName) {
+ OfferInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName, offerName);
+ if (inner != null) {
+ return new OfferImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private OffersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java
index 1e22db58c596..74c3b0276652 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java
@@ -123,26 +123,26 @@ private Mono listAsync() {
/**
* List all available Microsoft.AzureStackHCI provider operations.
*
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public OperationListResultInner list() {
- return listAsync().block();
+ public Response listWithResponse(Context context) {
+ return listWithResponseAsync(context).block();
}
/**
* List all available Microsoft.AzureStackHCI provider operations.
*
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}.
+ * @return a list of REST API operations supported by an Azure Resource Provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response listWithResponse(Context context) {
- return listWithResponseAsync(context).block();
+ public OperationListResultInner list() {
+ return listWithResponse(Context.NONE).getValue();
}
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java
index 9a5400b784a4..6ffcd8432998 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java
@@ -26,15 +26,6 @@ public OperationsImpl(
this.serviceManager = serviceManager;
}
- public OperationListResult list() {
- OperationListResultInner inner = this.serviceClient().list();
- if (inner != null) {
- return new OperationListResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response listWithResponse(Context context) {
Response inner = this.serviceClient().listWithResponse(context);
if (inner != null) {
@@ -48,6 +39,15 @@ public Response listWithResponse(Context context) {
}
}
+ public OperationListResult list() {
+ OperationListResultInner inner = this.serviceClient().list();
+ if (inner != null) {
+ return new OperationListResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private OperationsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java
new file mode 100644
index 000000000000..7267b2bfb735
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner;
+import com.azure.resourcemanager.azurestackhci.models.Publisher;
+
+public final class PublisherImpl implements Publisher {
+ private PublisherInner innerObject;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ PublisherImpl(
+ PublisherInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager 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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public PublisherInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java
new file mode 100644
index 000000000000..7434e84e8ca8
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java
@@ -0,0 +1,513 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.azurestackhci.fluent.PublishersClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner;
+import com.azure.resourcemanager.azurestackhci.models.PublisherList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PublishersClient. */
+public final class PublishersClientImpl implements PublishersClient {
+ /** The proxy service used to perform REST calls. */
+ private final PublishersService service;
+
+ /** The service client containing this operation class. */
+ private final AzureStackHciClientImpl client;
+
+ /**
+ * Initializes an instance of PublishersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PublishersClientImpl(AzureStackHciClientImpl client) {
+ this.service =
+ RestProxy.create(PublishersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureStackHciClientPublishers to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureStackHciClientP")
+ private interface PublishersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/publishers")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCluster(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/publishers/{publisherName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("publisherName") String publisherName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByClusterNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List Publishers available for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the 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 of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName) {
+ 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 (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
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ 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 Publishers available for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterSinglePageAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByCluster(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Publishers available for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the 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 of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Publishers available for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByClusterAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ return new PagedFlux<>(
+ () -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context),
+ nextLink -> listByClusterNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Publishers available for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the 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 of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName));
+ }
+
+ /**
+ * List Publishers available for the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
+ return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context));
+ }
+
+ /**
+ * Get Publisher resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI 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 publisher resource details of HCI Cluster along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String publisherName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get Publisher resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @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 publisher resource details of HCI Cluster along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String clusterName, String publisherName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get Publisher resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI 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 publisher resource details of HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String clusterName, String publisherName) {
+ return getWithResponseAsync(resourceGroupName, clusterName, publisherName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get Publisher resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @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 publisher resource details of HCI Cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String publisherName, Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, publisherName, context).block();
+ }
+
+ /**
+ * Get Publisher resource details of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI 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 publisher resource details of HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PublisherInner get(String resourceGroupName, String clusterName, String publisherName) {
+ return getWithResponse(resourceGroupName, clusterName, publisherName, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(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.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java
new file mode 100644
index 000000000000..0c57da8ee804
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.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.azurestackhci.fluent.PublishersClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner;
+import com.azure.resourcemanager.azurestackhci.models.Publisher;
+import com.azure.resourcemanager.azurestackhci.models.Publishers;
+
+public final class PublishersImpl implements Publishers {
+ private static final ClientLogger LOGGER = new ClientLogger(PublishersImpl.class);
+
+ private final PublishersClient innerClient;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ public PublishersImpl(
+ PublishersClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
+ PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName);
+ return Utils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByCluster(resourceGroupName, clusterName, context);
+ return Utils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String clusterName, String publisherName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, clusterName, publisherName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PublisherImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Publisher get(String resourceGroupName, String clusterName, String publisherName) {
+ PublisherInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName);
+ if (inner != null) {
+ return new PublisherImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private PublishersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java
new file mode 100644
index 000000000000..8a2673751d6f
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner;
+import com.azure.resourcemanager.azurestackhci.models.Sku;
+import com.azure.resourcemanager.azurestackhci.models.SkuMappings;
+import java.util.Collections;
+import java.util.List;
+
+public final class SkuImpl implements Sku {
+ private SkuInner innerObject;
+
+ private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager;
+
+ SkuImpl(SkuInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager 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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String publisherId() {
+ return this.innerModel().publisherId();
+ }
+
+ public String offerId() {
+ return this.innerModel().offerId();
+ }
+
+ public String content() {
+ return this.innerModel().content();
+ }
+
+ public String contentVersion() {
+ return this.innerModel().contentVersion();
+ }
+
+ public List skuMappings() {
+ List inner = this.innerModel().skuMappings();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public SkuInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java
new file mode 100644
index 000000000000..8efb4180079c
--- /dev/null
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java
@@ -0,0 +1,656 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurestackhci.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.azurestackhci.fluent.SkusClient;
+import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner;
+import com.azure.resourcemanager.azurestackhci.models.SkuList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in SkusClient. */
+public final class SkusClientImpl implements SkusClient {
+ /** The proxy service used to perform REST calls. */
+ private final SkusService service;
+
+ /** The service client containing this operation class. */
+ private final AzureStackHciClientImpl client;
+
+ /**
+ * Initializes an instance of SkusClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SkusClientImpl(AzureStackHciClientImpl client) {
+ this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureStackHciClientSkus to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureStackHciClientS")
+ private interface SkusService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByOffer(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("publisherName") String publisherName,
+ @PathParam("offerName") String offerName,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI"
+ + "/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus/{skuName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("publisherName") String publisherName,
+ @PathParam("offerName") String offerName,
+ @PathParam("skuName") String skuName,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$expand") String expand,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByOfferNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List Skus available for a offer within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByOfferSinglePageAsync(
+ String resourceGroupName, String clusterName, String publisherName, String offerName, String expand) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ if (offerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByOffer(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ offerName,
+ this.client.getApiVersion(),
+ expand,
+ 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 Skus available for a offer within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByOfferSinglePageAsync(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ if (offerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByOffer(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ offerName,
+ this.client.getApiVersion(),
+ expand,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Skus available for a offer within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByOfferAsync(
+ String resourceGroupName, String clusterName, String publisherName, String offerName, String expand) {
+ return new PagedFlux<>(
+ () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand),
+ nextLink -> listByOfferNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Skus available for a offer within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI 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 of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByOfferAsync(
+ String resourceGroupName, String clusterName, String publisherName, String offerName) {
+ final String expand = null;
+ return new PagedFlux<>(
+ () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand),
+ nextLink -> listByOfferNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Skus available for a offer within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByOfferAsync(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String expand,
+ Context context) {
+ return new PagedFlux<>(
+ () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context),
+ nextLink -> listByOfferNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Skus available for a offer within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI 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 of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByOffer(
+ String resourceGroupName, String clusterName, String publisherName, String offerName) {
+ final String expand = null;
+ return new PagedIterable<>(listByOfferAsync(resourceGroupName, clusterName, publisherName, offerName, expand));
+ }
+
+ /**
+ * List Skus available for a offer within the HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByOffer(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String expand,
+ Context context) {
+ return new PagedIterable<>(
+ listByOfferAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context));
+ }
+
+ /**
+ * Get SKU resource details within a offer of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param skuName The name of the SKU available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return sKU resource details within a offer of HCI Cluster along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String skuName,
+ String expand) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ if (offerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null."));
+ }
+ if (skuName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ offerName,
+ skuName,
+ this.client.getApiVersion(),
+ expand,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get SKU resource details within a offer of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param skuName The name of the SKU available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 sKU resource details within a offer of HCI Cluster along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String skuName,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ if (offerName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null."));
+ }
+ if (skuName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ publisherName,
+ offerName,
+ skuName,
+ this.client.getApiVersion(),
+ expand,
+ accept,
+ context);
+ }
+
+ /**
+ * Get SKU resource details within a offer of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param skuName The name of the SKU available within HCI 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 sKU resource details within a offer of HCI Cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName) {
+ final String expand = null;
+ return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, skuName, expand)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get SKU resource details within a offer of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param skuName The name of the SKU available within HCI cluster.
+ * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace
+ * offer.
+ * @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 sKU resource details within a offer of HCI Cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ String publisherName,
+ String offerName,
+ String skuName,
+ String expand,
+ Context context) {
+ return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, context)
+ .block();
+ }
+
+ /**
+ * Get SKU resource details within a offer of HCI Cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param publisherName The name of the publisher available within HCI cluster.
+ * @param offerName The name of the offer available within HCI cluster.
+ * @param skuName The name of the SKU available within HCI 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 sKU resource details within a offer of HCI Cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SkuInner get(
+ String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName) {
+ final String expand = null;
+ return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByOfferNextSinglePageAsync(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.listByOfferNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono