scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of AzureSphere service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the AzureSphere service API instance.
+ */
+ public AzureSphereManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.sphere")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new AzureSphereManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of Catalogs. It manages Catalog.
+ *
+ * @return Resource collection API of Catalogs.
+ */
+ public Catalogs catalogs() {
+ if (this.catalogs == null) {
+ this.catalogs = new CatalogsImpl(clientObject.getCatalogs(), this);
+ }
+ return catalogs;
+ }
+
+ /**
+ * Gets the resource collection API of Certificates.
+ *
+ * @return Resource collection API of Certificates.
+ */
+ public Certificates certificates() {
+ if (this.certificates == null) {
+ this.certificates = new CertificatesImpl(clientObject.getCertificates(), this);
+ }
+ return certificates;
+ }
+
+ /**
+ * Gets the resource collection API of Images. It manages Image.
+ *
+ * @return Resource collection API of Images.
+ */
+ public Images images() {
+ if (this.images == null) {
+ this.images = new ImagesImpl(clientObject.getImages(), this);
+ }
+ return images;
+ }
+
+ /**
+ * Gets the resource collection API of Products. It manages Product.
+ *
+ * @return Resource collection API of Products.
+ */
+ public Products products() {
+ if (this.products == null) {
+ this.products = new ProductsImpl(clientObject.getProducts(), this);
+ }
+ return products;
+ }
+
+ /**
+ * Gets the resource collection API of DeviceGroups. It manages DeviceGroup.
+ *
+ * @return Resource collection API of DeviceGroups.
+ */
+ public DeviceGroups deviceGroups() {
+ if (this.deviceGroups == null) {
+ this.deviceGroups = new DeviceGroupsImpl(clientObject.getDeviceGroups(), this);
+ }
+ return deviceGroups;
+ }
+
+ /**
+ * Gets the resource collection API of Deployments. It manages Deployment.
+ *
+ * @return Resource collection API of Deployments.
+ */
+ public Deployments deployments() {
+ if (this.deployments == null) {
+ this.deployments = new DeploymentsImpl(clientObject.getDeployments(), this);
+ }
+ return deployments;
+ }
+
+ /**
+ * Gets the resource collection API of Devices. It manages Device.
+ *
+ * @return Resource collection API of Devices.
+ */
+ public Devices devices() {
+ if (this.devices == null) {
+ this.devices = new DevicesImpl(clientObject.getDevices(), this);
+ }
+ return devices;
+ }
+
+ /**
+ * @return Wrapped service client AzureSphereManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public AzureSphereManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java
new file mode 100644
index 000000000000..82f217261953
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for AzureSphereManagementClient class. */
+public interface AzureSphereManagementClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the CatalogsClient object to access its operations.
+ *
+ * @return the CatalogsClient object.
+ */
+ CatalogsClient getCatalogs();
+
+ /**
+ * Gets the CertificatesClient object to access its operations.
+ *
+ * @return the CertificatesClient object.
+ */
+ CertificatesClient getCertificates();
+
+ /**
+ * Gets the ImagesClient object to access its operations.
+ *
+ * @return the ImagesClient object.
+ */
+ ImagesClient getImages();
+
+ /**
+ * Gets the ProductsClient object to access its operations.
+ *
+ * @return the ProductsClient object.
+ */
+ ProductsClient getProducts();
+
+ /**
+ * Gets the DeviceGroupsClient object to access its operations.
+ *
+ * @return the DeviceGroupsClient object.
+ */
+ DeviceGroupsClient getDeviceGroups();
+
+ /**
+ * Gets the DeploymentsClient object to access its operations.
+ *
+ * @return the DeploymentsClient object.
+ */
+ DeploymentsClient getDeployments();
+
+ /**
+ * Gets the DevicesClient object to access its operations.
+ *
+ * @return the DevicesClient object.
+ */
+ DevicesClient getDevices();
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java
new file mode 100644
index 000000000000..b06050790d6c
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java
@@ -0,0 +1,425 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sphere.fluent.models.CatalogInner;
+import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner;
+import com.azure.resourcemanager.sphere.models.CatalogUpdate;
+import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
+
+/** An instance of this class provides access to all the operations defined in CatalogsClient. */
+public interface CatalogsClient {
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Get a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String catalogName, Context context);
+
+ /**
+ * Get a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CatalogInner getByResourceGroup(String resourceGroupName, String catalogName);
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CatalogInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, CatalogInner resource);
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CatalogInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, CatalogInner resource, Context context);
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource);
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource, Context context);
+
+ /**
+ * Update a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String catalogName, CatalogUpdate properties, Context context);
+
+ /**
+ * Update a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CatalogInner update(String resourceGroupName, String catalogName, CatalogUpdate properties);
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName);
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, Context context);
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String catalogName);
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String catalogName, Context context);
+
+ /**
+ * Counts devices in catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response countDevicesWithResponse(
+ String resourceGroupName, String catalogName, Context context);
+
+ /**
+ * Counts devices in catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CountDeviceResponseInner countDevices(String resourceGroupName, String catalogName);
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeployments(String resourceGroupName, String catalogName);
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeployments(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeviceGroups(
+ String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest);
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeviceGroups(
+ String resourceGroupName,
+ String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeviceInsights(String resourceGroupName, String catalogName);
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDeviceInsights(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDevices(String resourceGroupName, String catalogName);
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listDevices(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java
new file mode 100644
index 000000000000..a25275cddf21
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sphere.fluent.models.CertificateChainResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.CertificateInner;
+import com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner;
+import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest;
+
+/** An instance of this class provides access to all the operations defined in CertificatesClient. */
+public interface CertificatesClient {
+ /**
+ * List Certificate resources by Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName);
+
+ /**
+ * List Certificate resources by Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Certificate list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+
+ /**
+ * Get a Certificate.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Certificate along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String catalogName, String serialNumber, Context context);
+
+ /**
+ * Get a Certificate.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateInner get(String resourceGroupName, String catalogName, String serialNumber);
+
+ /**
+ * Retrieves cert chain.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the certificate chain response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response retrieveCertChainWithResponse(
+ String resourceGroupName, String catalogName, String serialNumber, Context context);
+
+ /**
+ * Retrieves cert chain.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the certificate chain response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateChainResponseInner retrieveCertChain(String resourceGroupName, String catalogName, String serialNumber);
+
+ /**
+ * Gets the proof of possession nonce.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
+ * @param proofOfPossessionNonceRequest Proof of possession nonce request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the proof of possession nonce along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response retrieveProofOfPossessionNonceWithResponse(
+ String resourceGroupName,
+ String catalogName,
+ String serialNumber,
+ ProofOfPossessionNonceRequest proofOfPossessionNonceRequest,
+ Context context);
+
+ /**
+ * Gets the proof of possession nonce.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
+ * @param proofOfPossessionNonceRequest Proof of possession nonce request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the proof of possession nonce.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce(
+ String resourceGroupName,
+ String catalogName,
+ String serialNumber,
+ ProofOfPossessionNonceRequest proofOfPossessionNonceRequest);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java
new file mode 100644
index 000000000000..0d59f94edfa1
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java
@@ -0,0 +1,310 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner;
+
+/** An instance of this class provides access to all the operations defined in DeploymentsClient. */
+public interface DeploymentsClient {
+ /**
+ * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be
+ * used for product or device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDeviceGroup(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName);
+
+ /**
+ * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be
+ * used for product or device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDeviceGroup(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+
+ /**
+ * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device
+ * group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Deployment along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName,
+ Context context);
+
+ /**
+ * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device
+ * group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Deployment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeploymentInner get(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName);
+
+ /**
+ * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeploymentInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName,
+ DeploymentInner resource);
+
+ /**
+ * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeploymentInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName,
+ DeploymentInner resource,
+ Context context);
+
+ /**
+ * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an deployment resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeploymentInner createOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName,
+ DeploymentInner resource);
+
+ /**
+ * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an deployment resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeploymentInner createOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName,
+ DeploymentInner resource,
+ Context context);
+
+ /**
+ * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName);
+
+ /**
+ * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName,
+ Context context);
+
+ /**
+ * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName);
+
+ /**
+ * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
+ * the associated device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deploymentName,
+ Context context);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java
new file mode 100644
index 000000000000..4e210133bb5c
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java
@@ -0,0 +1,473 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner;
+import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest;
+import com.azure.resourcemanager.sphere.models.DeviceGroupUpdate;
+
+/** An instance of this class provides access to all the operations defined in DeviceGroupsClient. */
+public interface DeviceGroupsClient {
+ /**
+ * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used
+ * for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName);
+
+ /**
+ * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used
+ * for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByProduct(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+
+ /**
+ * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DeviceGroup along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context);
+
+ /**
+ * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DeviceGroup.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceGroupInner get(String resourceGroupName, String catalogName, String productName, String deviceGroupName);
+
+ /**
+ * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceGroupInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupInner resource);
+
+ /**
+ * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceGroupInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupInner resource,
+ Context context);
+
+ /**
+ * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceGroupInner createOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupInner resource);
+
+ /**
+ * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceGroupInner createOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupInner resource,
+ Context context);
+
+ /**
+ * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceGroupInner> beginUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupUpdate properties);
+
+ /**
+ * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceGroupInner> beginUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupUpdate properties,
+ Context context);
+
+ /**
+ * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceGroupInner update(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupUpdate properties);
+
+ /**
+ * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device group resource belonging to a product resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceGroupInner update(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ DeviceGroupUpdate properties,
+ Context context);
+
+ /**
+ * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName);
+
+ /**
+ * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context);
+
+ /**
+ * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName);
+
+ /**
+ * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
+ * device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context);
+
+ /**
+ * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk
+ * claiming devices to a catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param claimDevicesRequest Bulk claim devices request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginClaimDevices(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ ClaimDevicesRequest claimDevicesRequest);
+
+ /**
+ * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk
+ * claiming devices to a catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param claimDevicesRequest Bulk claim devices request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginClaimDevices(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ ClaimDevicesRequest claimDevicesRequest,
+ Context context);
+
+ /**
+ * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk
+ * claiming devices to a catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param claimDevicesRequest Bulk claim devices request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void claimDevices(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ ClaimDevicesRequest claimDevicesRequest);
+
+ /**
+ * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk
+ * claiming devices to a catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param claimDevicesRequest Bulk claim devices request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void claimDevices(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ ClaimDevicesRequest claimDevicesRequest,
+ Context context);
+
+ /**
+ * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for
+ * product or device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response countDevicesWithResponse(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context);
+
+ /**
+ * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for
+ * product or device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CountDeviceResponseInner countDevices(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DevicesClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DevicesClient.java
new file mode 100644
index 000000000000..b053aa5cadac
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DevicesClient.java
@@ -0,0 +1,477 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceInner;
+import com.azure.resourcemanager.sphere.fluent.models.SignedCapabilityImageResponseInner;
+import com.azure.resourcemanager.sphere.models.DeviceUpdate;
+import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest;
+
+/** An instance of this class provides access to all the operations defined in DevicesClient. */
+public interface DevicesClient {
+ /**
+ * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used
+ * for product or device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDeviceGroup(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName);
+
+ /**
+ * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used
+ * for product or device group name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDeviceGroup(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context);
+
+ /**
+ * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not
+ * belong to a device group and product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Device along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ Context context);
+
+ /**
+ * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not
+ * belong to a device group and product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Device.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceInner get(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName);
+
+ /**
+ * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the
+ * catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceInner resource);
+
+ /**
+ * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the
+ * catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceInner resource,
+ Context context);
+
+ /**
+ * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the
+ * catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceInner createOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceInner resource);
+
+ /**
+ * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the
+ * catalog only.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceInner createOrUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceInner resource,
+ Context context);
+
+ /**
+ * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the
+ * catalog level.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceInner> beginUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceUpdate properties);
+
+ /**
+ * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the
+ * catalog level.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DeviceInner> beginUpdate(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceUpdate properties,
+ Context context);
+
+ /**
+ * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the
+ * catalog level.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceInner update(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceUpdate properties);
+
+ /**
+ * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the
+ * catalog level.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an device resource belonging to a device group resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeviceInner update(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ DeviceUpdate properties,
+ Context context);
+
+ /**
+ * Delete a Device.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName);
+
+ /**
+ * Delete a Device.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ Context context);
+
+ /**
+ * Delete a Device.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName, String catalogName, String productName, String deviceGroupName, String deviceName);
+
+ /**
+ * Delete a Device.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ Context context);
+
+ /**
+ * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product
+ * names to generate the image for a device that does not belong to a specific device group and product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param generateDeviceCapabilityRequest Generate capability image request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of signed device capability image response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SignedCapabilityImageResponseInner>
+ beginGenerateCapabilityImage(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ GenerateCapabilityImageRequest generateDeviceCapabilityRequest);
+
+ /**
+ * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product
+ * names to generate the image for a device that does not belong to a specific device group and product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param generateDeviceCapabilityRequest Generate capability image request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of signed device capability image response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SignedCapabilityImageResponseInner>
+ beginGenerateCapabilityImage(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ GenerateCapabilityImageRequest generateDeviceCapabilityRequest,
+ Context context);
+
+ /**
+ * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product
+ * names to generate the image for a device that does not belong to a specific device group and product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param generateDeviceCapabilityRequest Generate capability image request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return signed device capability image response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SignedCapabilityImageResponseInner generateCapabilityImage(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ GenerateCapabilityImageRequest generateDeviceCapabilityRequest);
+
+ /**
+ * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product
+ * names to generate the image for a device that does not belong to a specific device group and product.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param deviceGroupName Name of device group.
+ * @param deviceName Device name.
+ * @param generateDeviceCapabilityRequest Generate capability image request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return signed device capability image response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SignedCapabilityImageResponseInner generateCapabilityImage(
+ String resourceGroupName,
+ String catalogName,
+ String productName,
+ String deviceGroupName,
+ String deviceName,
+ GenerateCapabilityImageRequest generateDeviceCapabilityRequest,
+ Context context);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ImagesClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ImagesClient.java
new file mode 100644
index 000000000000..205ceca662eb
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ImagesClient.java
@@ -0,0 +1,207 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sphere.fluent.models.ImageInner;
+
+/** An instance of this class provides access to all the operations defined in ImagesClient. */
+public interface ImagesClient {
+ /**
+ * List Image resources by Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Image list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName);
+
+ /**
+ * List Image resources by Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Image list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context);
+
+ /**
+ * Get a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Image along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String catalogName, String imageName, Context context);
+
+ /**
+ * Get a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Image.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImageInner get(String resourceGroupName, String catalogName, String imageName);
+
+ /**
+ * Create a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an image resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImageInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, String imageName, ImageInner resource);
+
+ /**
+ * Create a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an image resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ImageInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context);
+
+ /**
+ * Create a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an image resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImageInner createOrUpdate(String resourceGroupName, String catalogName, String imageName, ImageInner resource);
+
+ /**
+ * Create a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an image resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ImageInner createOrUpdate(
+ String resourceGroupName, String catalogName, String imageName, ImageInner resource, Context context);
+
+ /**
+ * Delete a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String imageName);
+
+ /**
+ * Delete a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String catalogName, String imageName, Context context);
+
+ /**
+ * Delete a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String catalogName, String imageName);
+
+ /**
+ * Delete a Image.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param imageName Image name. Use .default for image creation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String catalogName, String imageName, Context context);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/OperationsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/OperationsClient.java
new file mode 100644
index 000000000000..628bd10d47fc
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/OperationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sphere.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ProductsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ProductsClient.java
new file mode 100644
index 000000000000..bcf5c9ad4825
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/ProductsClient.java
@@ -0,0 +1,330 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner;
+import com.azure.resourcemanager.sphere.fluent.models.ProductInner;
+import com.azure.resourcemanager.sphere.models.ProductUpdate;
+
+/** An instance of this class provides access to all the operations defined in ProductsClient. */
+public interface ProductsClient {
+ /**
+ * List Product resources by Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Product list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName);
+
+ /**
+ * List Product resources by Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Product list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName, Context context);
+
+ /**
+ * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Product along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String catalogName, String productName, Context context);
+
+ /**
+ * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Product.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner get(String resourceGroupName, String catalogName, String productName);
+
+ /**
+ * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ProductInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, String productName, ProductInner resource);
+
+ /**
+ * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ProductInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context);
+
+ /**
+ * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner createOrUpdate(
+ String resourceGroupName, String catalogName, String productName, ProductInner resource);
+
+ /**
+ * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner createOrUpdate(
+ String resourceGroupName, String catalogName, String productName, ProductInner resource, Context context);
+
+ /**
+ * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ProductInner> beginUpdate(
+ String resourceGroupName, String catalogName, String productName, ProductUpdate properties);
+
+ /**
+ * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ProductInner> beginUpdate(
+ String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context);
+
+ /**
+ * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner update(String resourceGroupName, String catalogName, String productName, ProductUpdate properties);
+
+ /**
+ * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an product resource belonging to a catalog resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProductInner update(
+ String resourceGroupName, String catalogName, String productName, ProductUpdate properties, Context context);
+
+ /**
+ * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName);
+
+ /**
+ * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String catalogName, String productName, Context context);
+
+ /**
+ * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String catalogName, String productName);
+
+ /**
+ * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String catalogName, String productName, Context context);
+
+ /**
+ * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response countDevicesWithResponse(
+ String resourceGroupName, String catalogName, String productName, Context context);
+
+ /**
+ * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CountDeviceResponseInner countDevices(String resourceGroupName, String catalogName, String productName);
+
+ /**
+ * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and
+ * cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable generateDefaultDeviceGroups(
+ String resourceGroupName, String catalogName, String productName);
+
+ /**
+ * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and
+ * cannot be used for product name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param productName Name of product.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable generateDefaultDeviceGroups(
+ String resourceGroupName, String catalogName, String productName, Context context);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogInner.java
new file mode 100644
index 000000000000..a639e4b67f15
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogInner.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** An Azure Sphere catalog. */
+@Fluent
+public final class CatalogInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private CatalogProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of CatalogInner class. */
+ public CatalogInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private CatalogProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public CatalogInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public CatalogInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogProperties.java
new file mode 100644
index 000000000000..e5e5c035f83a
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CatalogProperties.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Catalog properties. */
+@Immutable
+public final class CatalogProperties {
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** Creates an instance of CatalogProperties class. */
+ public CatalogProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateChainResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateChainResponseInner.java
new file mode 100644
index 000000000000..e5e299011709
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateChainResponseInner.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The certificate chain response. */
+@Immutable
+public final class CertificateChainResponseInner {
+ /*
+ * The certificate chain.
+ */
+ @JsonProperty(value = "certificateChain", access = JsonProperty.Access.WRITE_ONLY)
+ private String certificateChain;
+
+ /** Creates an instance of CertificateChainResponseInner class. */
+ public CertificateChainResponseInner() {
+ }
+
+ /**
+ * Get the certificateChain property: The certificate chain.
+ *
+ * @return the certificateChain value.
+ */
+ public String certificateChain() {
+ return this.certificateChain;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateInner.java
new file mode 100644
index 000000000000..9f50de6cf610
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateInner.java
@@ -0,0 +1,125 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.sphere.models.CertificateStatus;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** An certificate resource belonging to a catalog resource. */
+@Immutable
+public final class CertificateInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private CertificateProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of CertificateInner class. */
+ public CertificateInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private CertificateProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the certificate property: The certificate as a UTF-8 encoded base 64 string.
+ *
+ * @return the certificate value.
+ */
+ public String certificate() {
+ return this.innerProperties() == null ? null : this.innerProperties().certificate();
+ }
+
+ /**
+ * Get the status property: The certificate status.
+ *
+ * @return the status value.
+ */
+ public CertificateStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Get the subject property: The certificate subject.
+ *
+ * @return the subject value.
+ */
+ public String subject() {
+ return this.innerProperties() == null ? null : this.innerProperties().subject();
+ }
+
+ /**
+ * Get the thumbprint property: The certificate thumbprint.
+ *
+ * @return the thumbprint value.
+ */
+ public String thumbprint() {
+ return this.innerProperties() == null ? null : this.innerProperties().thumbprint();
+ }
+
+ /**
+ * Get the expiryUtc property: The certificate expiry date.
+ *
+ * @return the expiryUtc value.
+ */
+ public OffsetDateTime expiryUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().expiryUtc();
+ }
+
+ /**
+ * Get the notBeforeUtc property: The certificate not before date.
+ *
+ * @return the notBeforeUtc value.
+ */
+ public OffsetDateTime notBeforeUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().notBeforeUtc();
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateProperties.java
new file mode 100644
index 000000000000..94db576f28bd
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CertificateProperties.java
@@ -0,0 +1,132 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.sphere.models.CertificateStatus;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties of certificate. */
+@Immutable
+public class CertificateProperties {
+ /*
+ * The certificate as a UTF-8 encoded base 64 string.
+ */
+ @JsonProperty(value = "certificate", access = JsonProperty.Access.WRITE_ONLY)
+ private String certificate;
+
+ /*
+ * The certificate status.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private CertificateStatus status;
+
+ /*
+ * The certificate subject.
+ */
+ @JsonProperty(value = "subject", access = JsonProperty.Access.WRITE_ONLY)
+ private String subject;
+
+ /*
+ * The certificate thumbprint.
+ */
+ @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY)
+ private String thumbprint;
+
+ /*
+ * The certificate expiry date.
+ */
+ @JsonProperty(value = "expiryUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime expiryUtc;
+
+ /*
+ * The certificate not before date.
+ */
+ @JsonProperty(value = "notBeforeUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime notBeforeUtc;
+
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** Creates an instance of CertificateProperties class. */
+ public CertificateProperties() {
+ }
+
+ /**
+ * Get the certificate property: The certificate as a UTF-8 encoded base 64 string.
+ *
+ * @return the certificate value.
+ */
+ public String certificate() {
+ return this.certificate;
+ }
+
+ /**
+ * Get the status property: The certificate status.
+ *
+ * @return the status value.
+ */
+ public CertificateStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the subject property: The certificate subject.
+ *
+ * @return the subject value.
+ */
+ public String subject() {
+ return this.subject;
+ }
+
+ /**
+ * Get the thumbprint property: The certificate thumbprint.
+ *
+ * @return the thumbprint value.
+ */
+ public String thumbprint() {
+ return this.thumbprint;
+ }
+
+ /**
+ * Get the expiryUtc property: The certificate expiry date.
+ *
+ * @return the expiryUtc value.
+ */
+ public OffsetDateTime expiryUtc() {
+ return this.expiryUtc;
+ }
+
+ /**
+ * Get the notBeforeUtc property: The certificate not before date.
+ *
+ * @return the notBeforeUtc value.
+ */
+ public OffsetDateTime notBeforeUtc() {
+ return this.notBeforeUtc;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CountDeviceResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CountDeviceResponseInner.java
new file mode 100644
index 000000000000..80c30909e9da
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/CountDeviceResponseInner.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sphere.models.CountElementsResponse;
+
+/** Response to the action call for count devices in a catalog. */
+@Fluent
+public final class CountDeviceResponseInner extends CountElementsResponse {
+ /** Creates an instance of CountDeviceResponseInner class. */
+ public CountDeviceResponseInner() {
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public CountDeviceResponseInner withValue(int value) {
+ super.withValue(value);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentInner.java
new file mode 100644
index 000000000000..ed70be5ad59c
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentInner.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** An deployment resource belonging to a device group resource. */
+@Fluent
+public final class DeploymentInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private DeploymentProperties innerProperties;
+
+ /** Creates an instance of DeploymentInner class. */
+ public DeploymentInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private DeploymentProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the deploymentId property: Deployment ID.
+ *
+ * @return the deploymentId value.
+ */
+ public String deploymentId() {
+ return this.innerProperties() == null ? null : this.innerProperties().deploymentId();
+ }
+
+ /**
+ * Set the deploymentId property: Deployment ID.
+ *
+ * @param deploymentId the deploymentId value to set.
+ * @return the DeploymentInner object itself.
+ */
+ public DeploymentInner withDeploymentId(String deploymentId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeploymentProperties();
+ }
+ this.innerProperties().withDeploymentId(deploymentId);
+ return this;
+ }
+
+ /**
+ * Get the deployedImages property: Images deployed.
+ *
+ * @return the deployedImages value.
+ */
+ public List deployedImages() {
+ return this.innerProperties() == null ? null : this.innerProperties().deployedImages();
+ }
+
+ /**
+ * Set the deployedImages property: Images deployed.
+ *
+ * @param deployedImages the deployedImages value to set.
+ * @return the DeploymentInner object itself.
+ */
+ public DeploymentInner withDeployedImages(List deployedImages) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeploymentProperties();
+ }
+ this.innerProperties().withDeployedImages(deployedImages);
+ return this;
+ }
+
+ /**
+ * Get the deploymentDateUtc property: Deployment date UTC.
+ *
+ * @return the deploymentDateUtc value.
+ */
+ public OffsetDateTime deploymentDateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().deploymentDateUtc();
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentProperties.java
new file mode 100644
index 000000000000..426c75a317fd
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeploymentProperties.java
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** The properties of deployment. */
+@Fluent
+public final class DeploymentProperties {
+ /*
+ * Deployment ID
+ */
+ @JsonProperty(value = "deploymentId")
+ private String deploymentId;
+
+ /*
+ * Images deployed
+ */
+ @JsonProperty(value = "deployedImages")
+ private List deployedImages;
+
+ /*
+ * Deployment date UTC
+ */
+ @JsonProperty(value = "deploymentDateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime deploymentDateUtc;
+
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** Creates an instance of DeploymentProperties class. */
+ public DeploymentProperties() {
+ }
+
+ /**
+ * Get the deploymentId property: Deployment ID.
+ *
+ * @return the deploymentId value.
+ */
+ public String deploymentId() {
+ return this.deploymentId;
+ }
+
+ /**
+ * Set the deploymentId property: Deployment ID.
+ *
+ * @param deploymentId the deploymentId value to set.
+ * @return the DeploymentProperties object itself.
+ */
+ public DeploymentProperties withDeploymentId(String deploymentId) {
+ this.deploymentId = deploymentId;
+ return this;
+ }
+
+ /**
+ * Get the deployedImages property: Images deployed.
+ *
+ * @return the deployedImages value.
+ */
+ public List deployedImages() {
+ return this.deployedImages;
+ }
+
+ /**
+ * Set the deployedImages property: Images deployed.
+ *
+ * @param deployedImages the deployedImages value to set.
+ * @return the DeploymentProperties object itself.
+ */
+ public DeploymentProperties withDeployedImages(List deployedImages) {
+ this.deployedImages = deployedImages;
+ return this;
+ }
+
+ /**
+ * Get the deploymentDateUtc property: Deployment date UTC.
+ *
+ * @return the deploymentDateUtc value.
+ */
+ public OffsetDateTime deploymentDateUtc() {
+ return this.deploymentDateUtc;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (deployedImages() != null) {
+ deployedImages().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupInner.java
new file mode 100644
index 000000000000..c09d49d6624e
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupInner.java
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection;
+import com.azure.resourcemanager.sphere.models.OSFeedType;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.azure.resourcemanager.sphere.models.RegionalDataBoundary;
+import com.azure.resourcemanager.sphere.models.UpdatePolicy;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An device group resource belonging to a product resource. */
+@Fluent
+public final class DeviceGroupInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private DeviceGroupProperties innerProperties;
+
+ /** Creates an instance of DeviceGroupInner class. */
+ public DeviceGroupInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private DeviceGroupProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the description property: Description of the device group.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: Description of the device group.
+ *
+ * @param description the description value to set.
+ * @return the DeviceGroupInner object itself.
+ */
+ public DeviceGroupInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeviceGroupProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the osFeedType property: Operating system feed type of the device group.
+ *
+ * @return the osFeedType value.
+ */
+ public OSFeedType osFeedType() {
+ return this.innerProperties() == null ? null : this.innerProperties().osFeedType();
+ }
+
+ /**
+ * Set the osFeedType property: Operating system feed type of the device group.
+ *
+ * @param osFeedType the osFeedType value to set.
+ * @return the DeviceGroupInner object itself.
+ */
+ public DeviceGroupInner withOsFeedType(OSFeedType osFeedType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeviceGroupProperties();
+ }
+ this.innerProperties().withOsFeedType(osFeedType);
+ return this;
+ }
+
+ /**
+ * Get the updatePolicy property: Update policy of the device group.
+ *
+ * @return the updatePolicy value.
+ */
+ public UpdatePolicy updatePolicy() {
+ return this.innerProperties() == null ? null : this.innerProperties().updatePolicy();
+ }
+
+ /**
+ * Set the updatePolicy property: Update policy of the device group.
+ *
+ * @param updatePolicy the updatePolicy value to set.
+ * @return the DeviceGroupInner object itself.
+ */
+ public DeviceGroupInner withUpdatePolicy(UpdatePolicy updatePolicy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeviceGroupProperties();
+ }
+ this.innerProperties().withUpdatePolicy(updatePolicy);
+ return this;
+ }
+
+ /**
+ * Get the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection.
+ *
+ * @return the allowCrashDumpsCollection value.
+ */
+ public AllowCrashDumpCollection allowCrashDumpsCollection() {
+ return this.innerProperties() == null ? null : this.innerProperties().allowCrashDumpsCollection();
+ }
+
+ /**
+ * Set the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection.
+ *
+ * @param allowCrashDumpsCollection the allowCrashDumpsCollection value to set.
+ * @return the DeviceGroupInner object itself.
+ */
+ public DeviceGroupInner withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeviceGroupProperties();
+ }
+ this.innerProperties().withAllowCrashDumpsCollection(allowCrashDumpsCollection);
+ return this;
+ }
+
+ /**
+ * Get the regionalDataBoundary property: Regional data boundary for the device group.
+ *
+ * @return the regionalDataBoundary value.
+ */
+ public RegionalDataBoundary regionalDataBoundary() {
+ return this.innerProperties() == null ? null : this.innerProperties().regionalDataBoundary();
+ }
+
+ /**
+ * Set the regionalDataBoundary property: Regional data boundary for the device group.
+ *
+ * @param regionalDataBoundary the regionalDataBoundary value to set.
+ * @return the DeviceGroupInner object itself.
+ */
+ public DeviceGroupInner withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeviceGroupProperties();
+ }
+ this.innerProperties().withRegionalDataBoundary(regionalDataBoundary);
+ return this;
+ }
+
+ /**
+ * Get the hasDeployment property: Deployment status for the device group.
+ *
+ * @return the hasDeployment value.
+ */
+ public Boolean hasDeployment() {
+ return this.innerProperties() == null ? null : this.innerProperties().hasDeployment();
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupProperties.java
new file mode 100644
index 000000000000..dfab130e9fa8
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupProperties.java
@@ -0,0 +1,189 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection;
+import com.azure.resourcemanager.sphere.models.OSFeedType;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.azure.resourcemanager.sphere.models.RegionalDataBoundary;
+import com.azure.resourcemanager.sphere.models.UpdatePolicy;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of deviceGroup. */
+@Fluent
+public final class DeviceGroupProperties {
+ /*
+ * Description of the device group.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Operating system feed type of the device group.
+ */
+ @JsonProperty(value = "osFeedType")
+ private OSFeedType osFeedType;
+
+ /*
+ * Update policy of the device group.
+ */
+ @JsonProperty(value = "updatePolicy")
+ private UpdatePolicy updatePolicy;
+
+ /*
+ * Flag to define if the user allows for crash dump collection.
+ */
+ @JsonProperty(value = "allowCrashDumpsCollection")
+ private AllowCrashDumpCollection allowCrashDumpsCollection;
+
+ /*
+ * Regional data boundary for the device group.
+ */
+ @JsonProperty(value = "regionalDataBoundary")
+ private RegionalDataBoundary regionalDataBoundary;
+
+ /*
+ * Deployment status for the device group.
+ */
+ @JsonProperty(value = "hasDeployment", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean hasDeployment;
+
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** Creates an instance of DeviceGroupProperties class. */
+ public DeviceGroupProperties() {
+ }
+
+ /**
+ * Get the description property: Description of the device group.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the device group.
+ *
+ * @param description the description value to set.
+ * @return the DeviceGroupProperties object itself.
+ */
+ public DeviceGroupProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the osFeedType property: Operating system feed type of the device group.
+ *
+ * @return the osFeedType value.
+ */
+ public OSFeedType osFeedType() {
+ return this.osFeedType;
+ }
+
+ /**
+ * Set the osFeedType property: Operating system feed type of the device group.
+ *
+ * @param osFeedType the osFeedType value to set.
+ * @return the DeviceGroupProperties object itself.
+ */
+ public DeviceGroupProperties withOsFeedType(OSFeedType osFeedType) {
+ this.osFeedType = osFeedType;
+ return this;
+ }
+
+ /**
+ * Get the updatePolicy property: Update policy of the device group.
+ *
+ * @return the updatePolicy value.
+ */
+ public UpdatePolicy updatePolicy() {
+ return this.updatePolicy;
+ }
+
+ /**
+ * Set the updatePolicy property: Update policy of the device group.
+ *
+ * @param updatePolicy the updatePolicy value to set.
+ * @return the DeviceGroupProperties object itself.
+ */
+ public DeviceGroupProperties withUpdatePolicy(UpdatePolicy updatePolicy) {
+ this.updatePolicy = updatePolicy;
+ return this;
+ }
+
+ /**
+ * Get the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection.
+ *
+ * @return the allowCrashDumpsCollection value.
+ */
+ public AllowCrashDumpCollection allowCrashDumpsCollection() {
+ return this.allowCrashDumpsCollection;
+ }
+
+ /**
+ * Set the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection.
+ *
+ * @param allowCrashDumpsCollection the allowCrashDumpsCollection value to set.
+ * @return the DeviceGroupProperties object itself.
+ */
+ public DeviceGroupProperties withAllowCrashDumpsCollection(AllowCrashDumpCollection allowCrashDumpsCollection) {
+ this.allowCrashDumpsCollection = allowCrashDumpsCollection;
+ return this;
+ }
+
+ /**
+ * Get the regionalDataBoundary property: Regional data boundary for the device group.
+ *
+ * @return the regionalDataBoundary value.
+ */
+ public RegionalDataBoundary regionalDataBoundary() {
+ return this.regionalDataBoundary;
+ }
+
+ /**
+ * Set the regionalDataBoundary property: Regional data boundary for the device group.
+ *
+ * @param regionalDataBoundary the regionalDataBoundary value to set.
+ * @return the DeviceGroupProperties object itself.
+ */
+ public DeviceGroupProperties withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) {
+ this.regionalDataBoundary = regionalDataBoundary;
+ return this;
+ }
+
+ /**
+ * Get the hasDeployment property: Deployment status for the device group.
+ *
+ * @return the hasDeployment value.
+ */
+ public Boolean hasDeployment() {
+ return this.hasDeployment;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupUpdateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupUpdateProperties.java
new file mode 100644
index 000000000000..055f245fd236
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceGroupUpdateProperties.java
@@ -0,0 +1,159 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sphere.models.AllowCrashDumpCollection;
+import com.azure.resourcemanager.sphere.models.OSFeedType;
+import com.azure.resourcemanager.sphere.models.RegionalDataBoundary;
+import com.azure.resourcemanager.sphere.models.UpdatePolicy;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The updatable properties of the DeviceGroup. */
+@Fluent
+public final class DeviceGroupUpdateProperties {
+ /*
+ * Description of the device group.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Operating system feed type of the device group.
+ */
+ @JsonProperty(value = "osFeedType")
+ private OSFeedType osFeedType;
+
+ /*
+ * Update policy of the device group.
+ */
+ @JsonProperty(value = "updatePolicy")
+ private UpdatePolicy updatePolicy;
+
+ /*
+ * Flag to define if the user allows for crash dump collection.
+ */
+ @JsonProperty(value = "allowCrashDumpsCollection")
+ private AllowCrashDumpCollection allowCrashDumpsCollection;
+
+ /*
+ * Regional data boundary for the device group.
+ */
+ @JsonProperty(value = "regionalDataBoundary")
+ private RegionalDataBoundary regionalDataBoundary;
+
+ /** Creates an instance of DeviceGroupUpdateProperties class. */
+ public DeviceGroupUpdateProperties() {
+ }
+
+ /**
+ * Get the description property: Description of the device group.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the device group.
+ *
+ * @param description the description value to set.
+ * @return the DeviceGroupUpdateProperties object itself.
+ */
+ public DeviceGroupUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the osFeedType property: Operating system feed type of the device group.
+ *
+ * @return the osFeedType value.
+ */
+ public OSFeedType osFeedType() {
+ return this.osFeedType;
+ }
+
+ /**
+ * Set the osFeedType property: Operating system feed type of the device group.
+ *
+ * @param osFeedType the osFeedType value to set.
+ * @return the DeviceGroupUpdateProperties object itself.
+ */
+ public DeviceGroupUpdateProperties withOsFeedType(OSFeedType osFeedType) {
+ this.osFeedType = osFeedType;
+ return this;
+ }
+
+ /**
+ * Get the updatePolicy property: Update policy of the device group.
+ *
+ * @return the updatePolicy value.
+ */
+ public UpdatePolicy updatePolicy() {
+ return this.updatePolicy;
+ }
+
+ /**
+ * Set the updatePolicy property: Update policy of the device group.
+ *
+ * @param updatePolicy the updatePolicy value to set.
+ * @return the DeviceGroupUpdateProperties object itself.
+ */
+ public DeviceGroupUpdateProperties withUpdatePolicy(UpdatePolicy updatePolicy) {
+ this.updatePolicy = updatePolicy;
+ return this;
+ }
+
+ /**
+ * Get the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection.
+ *
+ * @return the allowCrashDumpsCollection value.
+ */
+ public AllowCrashDumpCollection allowCrashDumpsCollection() {
+ return this.allowCrashDumpsCollection;
+ }
+
+ /**
+ * Set the allowCrashDumpsCollection property: Flag to define if the user allows for crash dump collection.
+ *
+ * @param allowCrashDumpsCollection the allowCrashDumpsCollection value to set.
+ * @return the DeviceGroupUpdateProperties object itself.
+ */
+ public DeviceGroupUpdateProperties withAllowCrashDumpsCollection(
+ AllowCrashDumpCollection allowCrashDumpsCollection) {
+ this.allowCrashDumpsCollection = allowCrashDumpsCollection;
+ return this;
+ }
+
+ /**
+ * Get the regionalDataBoundary property: Regional data boundary for the device group.
+ *
+ * @return the regionalDataBoundary value.
+ */
+ public RegionalDataBoundary regionalDataBoundary() {
+ return this.regionalDataBoundary;
+ }
+
+ /**
+ * Set the regionalDataBoundary property: Regional data boundary for the device group.
+ *
+ * @param regionalDataBoundary the regionalDataBoundary value to set.
+ * @return the DeviceGroupUpdateProperties object itself.
+ */
+ public DeviceGroupUpdateProperties withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) {
+ this.regionalDataBoundary = regionalDataBoundary;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInner.java
new file mode 100644
index 000000000000..4d6a8dfe174b
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInner.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** An device resource belonging to a device group resource. */
+@Fluent
+public final class DeviceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private DeviceProperties innerProperties;
+
+ /** Creates an instance of DeviceInner class. */
+ public DeviceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private DeviceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the deviceId property: Device ID.
+ *
+ * @return the deviceId value.
+ */
+ public String deviceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().deviceId();
+ }
+
+ /**
+ * Set the deviceId property: Device ID.
+ *
+ * @param deviceId the deviceId value to set.
+ * @return the DeviceInner object itself.
+ */
+ public DeviceInner withDeviceId(String deviceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DeviceProperties();
+ }
+ this.innerProperties().withDeviceId(deviceId);
+ return this;
+ }
+
+ /**
+ * Get the chipSku property: SKU of the chip.
+ *
+ * @return the chipSku value.
+ */
+ public String chipSku() {
+ return this.innerProperties() == null ? null : this.innerProperties().chipSku();
+ }
+
+ /**
+ * Get the lastAvailableOsVersion property: OS version available for installation when update requested.
+ *
+ * @return the lastAvailableOsVersion value.
+ */
+ public String lastAvailableOsVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastAvailableOsVersion();
+ }
+
+ /**
+ * Get the lastInstalledOsVersion property: OS version running on device when update requested.
+ *
+ * @return the lastInstalledOsVersion value.
+ */
+ public String lastInstalledOsVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastInstalledOsVersion();
+ }
+
+ /**
+ * Get the lastOsUpdateUtc property: Time when update requested and new OS version available.
+ *
+ * @return the lastOsUpdateUtc value.
+ */
+ public OffsetDateTime lastOsUpdateUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastOsUpdateUtc();
+ }
+
+ /**
+ * Get the lastUpdateRequestUtc property: Time when update was last requested.
+ *
+ * @return the lastUpdateRequestUtc value.
+ */
+ public OffsetDateTime lastUpdateRequestUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastUpdateRequestUtc();
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInsightInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInsightInner.java
new file mode 100644
index 000000000000..4290335b8721
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceInsightInner.java
@@ -0,0 +1,274 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Device insight report. */
+@Fluent
+public final class DeviceInsightInner {
+ /*
+ * Device ID
+ */
+ @JsonProperty(value = "deviceId", required = true)
+ private String deviceId;
+
+ /*
+ * Event description
+ */
+ @JsonProperty(value = "description", required = true)
+ private String description;
+
+ /*
+ * Event start timestamp
+ */
+ @JsonProperty(value = "startTimestampUtc", required = true)
+ private OffsetDateTime startTimestampUtc;
+
+ /*
+ * Event end timestamp
+ */
+ @JsonProperty(value = "endTimestampUtc", required = true)
+ private OffsetDateTime endTimestampUtc;
+
+ /*
+ * Event category
+ */
+ @JsonProperty(value = "eventCategory", required = true)
+ private String eventCategory;
+
+ /*
+ * Event class
+ */
+ @JsonProperty(value = "eventClass", required = true)
+ private String eventClass;
+
+ /*
+ * Event type
+ */
+ @JsonProperty(value = "eventType", required = true)
+ private String eventType;
+
+ /*
+ * Event count
+ */
+ @JsonProperty(value = "eventCount", required = true)
+ private int eventCount;
+
+ /** Creates an instance of DeviceInsightInner class. */
+ public DeviceInsightInner() {
+ }
+
+ /**
+ * Get the deviceId property: Device ID.
+ *
+ * @return the deviceId value.
+ */
+ public String deviceId() {
+ return this.deviceId;
+ }
+
+ /**
+ * Set the deviceId property: Device ID.
+ *
+ * @param deviceId the deviceId value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withDeviceId(String deviceId) {
+ this.deviceId = deviceId;
+ return this;
+ }
+
+ /**
+ * Get the description property: Event description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Event description.
+ *
+ * @param description the description value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the startTimestampUtc property: Event start timestamp.
+ *
+ * @return the startTimestampUtc value.
+ */
+ public OffsetDateTime startTimestampUtc() {
+ return this.startTimestampUtc;
+ }
+
+ /**
+ * Set the startTimestampUtc property: Event start timestamp.
+ *
+ * @param startTimestampUtc the startTimestampUtc value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withStartTimestampUtc(OffsetDateTime startTimestampUtc) {
+ this.startTimestampUtc = startTimestampUtc;
+ return this;
+ }
+
+ /**
+ * Get the endTimestampUtc property: Event end timestamp.
+ *
+ * @return the endTimestampUtc value.
+ */
+ public OffsetDateTime endTimestampUtc() {
+ return this.endTimestampUtc;
+ }
+
+ /**
+ * Set the endTimestampUtc property: Event end timestamp.
+ *
+ * @param endTimestampUtc the endTimestampUtc value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withEndTimestampUtc(OffsetDateTime endTimestampUtc) {
+ this.endTimestampUtc = endTimestampUtc;
+ return this;
+ }
+
+ /**
+ * Get the eventCategory property: Event category.
+ *
+ * @return the eventCategory value.
+ */
+ public String eventCategory() {
+ return this.eventCategory;
+ }
+
+ /**
+ * Set the eventCategory property: Event category.
+ *
+ * @param eventCategory the eventCategory value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withEventCategory(String eventCategory) {
+ this.eventCategory = eventCategory;
+ return this;
+ }
+
+ /**
+ * Get the eventClass property: Event class.
+ *
+ * @return the eventClass value.
+ */
+ public String eventClass() {
+ return this.eventClass;
+ }
+
+ /**
+ * Set the eventClass property: Event class.
+ *
+ * @param eventClass the eventClass value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withEventClass(String eventClass) {
+ this.eventClass = eventClass;
+ return this;
+ }
+
+ /**
+ * Get the eventType property: Event type.
+ *
+ * @return the eventType value.
+ */
+ public String eventType() {
+ return this.eventType;
+ }
+
+ /**
+ * Set the eventType property: Event type.
+ *
+ * @param eventType the eventType value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withEventType(String eventType) {
+ this.eventType = eventType;
+ return this;
+ }
+
+ /**
+ * Get the eventCount property: Event count.
+ *
+ * @return the eventCount value.
+ */
+ public int eventCount() {
+ return this.eventCount;
+ }
+
+ /**
+ * Set the eventCount property: Event count.
+ *
+ * @param eventCount the eventCount value to set.
+ * @return the DeviceInsightInner object itself.
+ */
+ public DeviceInsightInner withEventCount(int eventCount) {
+ this.eventCount = eventCount;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (deviceId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property deviceId in model DeviceInsightInner"));
+ }
+ if (description() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property description in model DeviceInsightInner"));
+ }
+ if (startTimestampUtc() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property startTimestampUtc in model DeviceInsightInner"));
+ }
+ if (endTimestampUtc() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property endTimestampUtc in model DeviceInsightInner"));
+ }
+ if (eventCategory() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property eventCategory in model DeviceInsightInner"));
+ }
+ if (eventClass() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property eventClass in model DeviceInsightInner"));
+ }
+ if (eventType() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property eventType in model DeviceInsightInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(DeviceInsightInner.class);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceProperties.java
new file mode 100644
index 000000000000..007b9a67c80d
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceProperties.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties of device. */
+@Fluent
+public final class DeviceProperties {
+ /*
+ * Device ID
+ */
+ @JsonProperty(value = "deviceId")
+ private String deviceId;
+
+ /*
+ * SKU of the chip
+ */
+ @JsonProperty(value = "chipSku", access = JsonProperty.Access.WRITE_ONLY)
+ private String chipSku;
+
+ /*
+ * OS version available for installation when update requested
+ */
+ @JsonProperty(value = "lastAvailableOsVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastAvailableOsVersion;
+
+ /*
+ * OS version running on device when update requested
+ */
+ @JsonProperty(value = "lastInstalledOsVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastInstalledOsVersion;
+
+ /*
+ * Time when update requested and new OS version available
+ */
+ @JsonProperty(value = "lastOsUpdateUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastOsUpdateUtc;
+
+ /*
+ * Time when update was last requested
+ */
+ @JsonProperty(value = "lastUpdateRequestUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastUpdateRequestUtc;
+
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** Creates an instance of DeviceProperties class. */
+ public DeviceProperties() {
+ }
+
+ /**
+ * Get the deviceId property: Device ID.
+ *
+ * @return the deviceId value.
+ */
+ public String deviceId() {
+ return this.deviceId;
+ }
+
+ /**
+ * Set the deviceId property: Device ID.
+ *
+ * @param deviceId the deviceId value to set.
+ * @return the DeviceProperties object itself.
+ */
+ public DeviceProperties withDeviceId(String deviceId) {
+ this.deviceId = deviceId;
+ return this;
+ }
+
+ /**
+ * Get the chipSku property: SKU of the chip.
+ *
+ * @return the chipSku value.
+ */
+ public String chipSku() {
+ return this.chipSku;
+ }
+
+ /**
+ * Get the lastAvailableOsVersion property: OS version available for installation when update requested.
+ *
+ * @return the lastAvailableOsVersion value.
+ */
+ public String lastAvailableOsVersion() {
+ return this.lastAvailableOsVersion;
+ }
+
+ /**
+ * Get the lastInstalledOsVersion property: OS version running on device when update requested.
+ *
+ * @return the lastInstalledOsVersion value.
+ */
+ public String lastInstalledOsVersion() {
+ return this.lastInstalledOsVersion;
+ }
+
+ /**
+ * Get the lastOsUpdateUtc property: Time when update requested and new OS version available.
+ *
+ * @return the lastOsUpdateUtc value.
+ */
+ public OffsetDateTime lastOsUpdateUtc() {
+ return this.lastOsUpdateUtc;
+ }
+
+ /**
+ * Get the lastUpdateRequestUtc property: Time when update was last requested.
+ *
+ * @return the lastUpdateRequestUtc value.
+ */
+ public OffsetDateTime lastUpdateRequestUtc() {
+ return this.lastUpdateRequestUtc;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceUpdateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceUpdateProperties.java
new file mode 100644
index 000000000000..d89b5654acf6
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/DeviceUpdateProperties.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The updatable properties of the Device. */
+@Fluent
+public final class DeviceUpdateProperties {
+ /*
+ * Device group id
+ */
+ @JsonProperty(value = "deviceGroupId")
+ private String deviceGroupId;
+
+ /** Creates an instance of DeviceUpdateProperties class. */
+ public DeviceUpdateProperties() {
+ }
+
+ /**
+ * Get the deviceGroupId property: Device group id.
+ *
+ * @return the deviceGroupId value.
+ */
+ public String deviceGroupId() {
+ return this.deviceGroupId;
+ }
+
+ /**
+ * Set the deviceGroupId property: Device group id.
+ *
+ * @param deviceGroupId the deviceGroupId value to set.
+ * @return the DeviceUpdateProperties object itself.
+ */
+ public DeviceUpdateProperties withDeviceGroupId(String deviceGroupId) {
+ this.deviceGroupId = deviceGroupId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageInner.java
new file mode 100644
index 000000000000..7f5a89784b1f
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageInner.java
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.sphere.models.ImageType;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.azure.resourcemanager.sphere.models.RegionalDataBoundary;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An image resource belonging to a catalog resource. */
+@Fluent
+public final class ImageInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private ImageProperties innerProperties;
+
+ /** Creates an instance of ImageInner class. */
+ public ImageInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ImageProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image
+ * URI on image reads.
+ *
+ * @return the image value.
+ */
+ public String image() {
+ return this.innerProperties() == null ? null : this.innerProperties().image();
+ }
+
+ /**
+ * Set the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image
+ * URI on image reads.
+ *
+ * @param image the image value to set.
+ * @return the ImageInner object itself.
+ */
+ public ImageInner withImage(String image) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ImageProperties();
+ }
+ this.innerProperties().withImage(image);
+ return this;
+ }
+
+ /**
+ * Get the imageId property: Image ID.
+ *
+ * @return the imageId value.
+ */
+ public String imageId() {
+ return this.innerProperties() == null ? null : this.innerProperties().imageId();
+ }
+
+ /**
+ * Set the imageId property: Image ID.
+ *
+ * @param imageId the imageId value to set.
+ * @return the ImageInner object itself.
+ */
+ public ImageInner withImageId(String imageId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ImageProperties();
+ }
+ this.innerProperties().withImageId(imageId);
+ return this;
+ }
+
+ /**
+ * Get the imageName property: Image name.
+ *
+ * @return the imageName value.
+ */
+ public String imageName() {
+ return this.innerProperties() == null ? null : this.innerProperties().imageName();
+ }
+
+ /**
+ * Get the regionalDataBoundary property: Regional data boundary for an image.
+ *
+ * @return the regionalDataBoundary value.
+ */
+ public RegionalDataBoundary regionalDataBoundary() {
+ return this.innerProperties() == null ? null : this.innerProperties().regionalDataBoundary();
+ }
+
+ /**
+ * Set the regionalDataBoundary property: Regional data boundary for an image.
+ *
+ * @param regionalDataBoundary the regionalDataBoundary value to set.
+ * @return the ImageInner object itself.
+ */
+ public ImageInner withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ImageProperties();
+ }
+ this.innerProperties().withRegionalDataBoundary(regionalDataBoundary);
+ return this;
+ }
+
+ /**
+ * Get the uri property: Location the image.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.innerProperties() == null ? null : this.innerProperties().uri();
+ }
+
+ /**
+ * Get the description property: The image description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Get the componentId property: The image component id.
+ *
+ * @return the componentId value.
+ */
+ public String componentId() {
+ return this.innerProperties() == null ? null : this.innerProperties().componentId();
+ }
+
+ /**
+ * Get the imageType property: The image type.
+ *
+ * @return the imageType value.
+ */
+ public ImageType imageType() {
+ return this.innerProperties() == null ? null : this.innerProperties().imageType();
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageProperties.java
new file mode 100644
index 000000000000..26464c8d0a60
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ImageProperties.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sphere.models.ImageType;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.azure.resourcemanager.sphere.models.RegionalDataBoundary;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of image. */
+@Fluent
+public final class ImageProperties {
+ /*
+ * Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.
+ */
+ @JsonProperty(value = "image")
+ private String image;
+
+ /*
+ * Image ID
+ */
+ @JsonProperty(value = "imageId")
+ private String imageId;
+
+ /*
+ * Image name
+ */
+ @JsonProperty(value = "imageName", access = JsonProperty.Access.WRITE_ONLY)
+ private String imageName;
+
+ /*
+ * Regional data boundary for an image
+ */
+ @JsonProperty(value = "regionalDataBoundary")
+ private RegionalDataBoundary regionalDataBoundary;
+
+ /*
+ * Location the image
+ */
+ @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY)
+ private String uri;
+
+ /*
+ * The image description.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * The image component id.
+ */
+ @JsonProperty(value = "componentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String componentId;
+
+ /*
+ * The image type.
+ */
+ @JsonProperty(value = "imageType", access = JsonProperty.Access.WRITE_ONLY)
+ private ImageType imageType;
+
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** Creates an instance of ImageProperties class. */
+ public ImageProperties() {
+ }
+
+ /**
+ * Get the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image
+ * URI on image reads.
+ *
+ * @return the image value.
+ */
+ public String image() {
+ return this.image;
+ }
+
+ /**
+ * Set the image property: Image as a UTF-8 encoded base 64 string on image create. This field contains the image
+ * URI on image reads.
+ *
+ * @param image the image value to set.
+ * @return the ImageProperties object itself.
+ */
+ public ImageProperties withImage(String image) {
+ this.image = image;
+ return this;
+ }
+
+ /**
+ * Get the imageId property: Image ID.
+ *
+ * @return the imageId value.
+ */
+ public String imageId() {
+ return this.imageId;
+ }
+
+ /**
+ * Set the imageId property: Image ID.
+ *
+ * @param imageId the imageId value to set.
+ * @return the ImageProperties object itself.
+ */
+ public ImageProperties withImageId(String imageId) {
+ this.imageId = imageId;
+ return this;
+ }
+
+ /**
+ * Get the imageName property: Image name.
+ *
+ * @return the imageName value.
+ */
+ public String imageName() {
+ return this.imageName;
+ }
+
+ /**
+ * Get the regionalDataBoundary property: Regional data boundary for an image.
+ *
+ * @return the regionalDataBoundary value.
+ */
+ public RegionalDataBoundary regionalDataBoundary() {
+ return this.regionalDataBoundary;
+ }
+
+ /**
+ * Set the regionalDataBoundary property: Regional data boundary for an image.
+ *
+ * @param regionalDataBoundary the regionalDataBoundary value to set.
+ * @return the ImageProperties object itself.
+ */
+ public ImageProperties withRegionalDataBoundary(RegionalDataBoundary regionalDataBoundary) {
+ this.regionalDataBoundary = regionalDataBoundary;
+ return this;
+ }
+
+ /**
+ * Get the uri property: Location the image.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.uri;
+ }
+
+ /**
+ * Get the description property: The image description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the componentId property: The image component id.
+ *
+ * @return the componentId value.
+ */
+ public String componentId() {
+ return this.componentId;
+ }
+
+ /**
+ * Get the imageType property: The image type.
+ *
+ * @return the imageType value.
+ */
+ public ImageType imageType() {
+ return this.imageType;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/OperationInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..239055d7f070
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/OperationInner.java
@@ -0,0 +1,127 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.sphere.models.ActionType;
+import com.azure.resourcemanager.sphere.models.OperationDisplay;
+import com.azure.resourcemanager.sphere.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductInner.java
new file mode 100644
index 000000000000..c5a3f9cc1d70
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductInner.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.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An product resource belonging to a catalog resource. */
+@Fluent
+public final class ProductInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private ProductProperties innerProperties;
+
+ /** Creates an instance of ProductInner class. */
+ public ProductInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ProductProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the description property: Description of the product.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: Description of the product.
+ *
+ * @param description the description value to set.
+ * @return the ProductInner object itself.
+ */
+ public ProductInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProductProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductProperties.java
new file mode 100644
index 000000000000..c9e8cd2176f7
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductProperties.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of product. */
+@Fluent
+public final class ProductProperties {
+ /*
+ * Description of the product
+ */
+ @JsonProperty(value = "description", required = true)
+ private String description;
+
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** Creates an instance of ProductProperties class. */
+ public ProductProperties() {
+ }
+
+ /**
+ * Get the description property: Description of the product.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the product.
+ *
+ * @param description the description value to set.
+ * @return the ProductProperties object itself.
+ */
+ public ProductProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (description() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property description in model ProductProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ProductProperties.class);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java
new file mode 100644
index 000000000000..77e75f019861
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProductUpdateProperties.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The updatable properties of the Product. */
+@Fluent
+public final class ProductUpdateProperties {
+ /*
+ * Description of the product
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /** Creates an instance of ProductUpdateProperties class. */
+ public ProductUpdateProperties() {
+ }
+
+ /**
+ * Get the description property: Description of the product.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Description of the product.
+ *
+ * @param description the description value to set.
+ * @return the ProductUpdateProperties object itself.
+ */
+ public ProductUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProofOfPossessionNonceResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProofOfPossessionNonceResponseInner.java
new file mode 100644
index 000000000000..ee5f94ce18c2
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/ProofOfPossessionNonceResponseInner.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+
+/** Result of the action to generate a proof of possession nonce. */
+@Immutable
+public final class ProofOfPossessionNonceResponseInner extends CertificateProperties {
+ /** Creates an instance of ProofOfPossessionNonceResponseInner class. */
+ public ProofOfPossessionNonceResponseInner() {
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/SignedCapabilityImageResponseInner.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/SignedCapabilityImageResponseInner.java
new file mode 100644
index 000000000000..1822b0e45722
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/SignedCapabilityImageResponseInner.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Signed device capability image response. */
+@Immutable
+public final class SignedCapabilityImageResponseInner {
+ /*
+ * The signed device capability image as a UTF-8 encoded base 64 string.
+ */
+ @JsonProperty(value = "image", access = JsonProperty.Access.WRITE_ONLY)
+ private String image;
+
+ /** Creates an instance of SignedCapabilityImageResponseInner class. */
+ public SignedCapabilityImageResponseInner() {
+ }
+
+ /**
+ * Get the image property: The signed device capability image as a UTF-8 encoded base 64 string.
+ *
+ * @return the image value.
+ */
+ public String image() {
+ return this.image;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/package-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/package-info.java
new file mode 100644
index 000000000000..6c295b60279c
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for AzureSphereManagementClient. Azure Sphere resource management API. */
+package com.azure.resourcemanager.sphere.fluent.models;
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/package-info.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/package-info.java
new file mode 100644
index 000000000000..9853cc0ca23a
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for AzureSphereManagementClient. Azure Sphere resource management API. */
+package com.azure.resourcemanager.sphere.fluent;
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java
new file mode 100644
index 000000000000..6f5c108a3bba
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientBuilder.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the AzureSphereManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {AzureSphereManagementClientImpl.class})
+public final class AzureSphereManagementClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the AzureSphereManagementClientBuilder.
+ */
+ public AzureSphereManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the AzureSphereManagementClientBuilder.
+ */
+ public AzureSphereManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the AzureSphereManagementClientBuilder.
+ */
+ public AzureSphereManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the AzureSphereManagementClientBuilder.
+ */
+ public AzureSphereManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the AzureSphereManagementClientBuilder.
+ */
+ public AzureSphereManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the AzureSphereManagementClientBuilder.
+ */
+ public AzureSphereManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of AzureSphereManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of AzureSphereManagementClientImpl.
+ */
+ public AzureSphereManagementClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ AzureSphereManagementClientImpl client =
+ new AzureSphereManagementClientImpl(
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java
new file mode 100644
index 000000000000..251919142566
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/AzureSphereManagementClientImpl.java
@@ -0,0 +1,388 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.sphere.fluent.AzureSphereManagementClient;
+import com.azure.resourcemanager.sphere.fluent.CatalogsClient;
+import com.azure.resourcemanager.sphere.fluent.CertificatesClient;
+import com.azure.resourcemanager.sphere.fluent.DeploymentsClient;
+import com.azure.resourcemanager.sphere.fluent.DeviceGroupsClient;
+import com.azure.resourcemanager.sphere.fluent.DevicesClient;
+import com.azure.resourcemanager.sphere.fluent.ImagesClient;
+import com.azure.resourcemanager.sphere.fluent.OperationsClient;
+import com.azure.resourcemanager.sphere.fluent.ProductsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the AzureSphereManagementClientImpl type. */
+@ServiceClient(builder = AzureSphereManagementClientBuilder.class)
+public final class AzureSphereManagementClientImpl implements AzureSphereManagementClient {
+ /** The ID of the target subscription. */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The CatalogsClient object to access its operations. */
+ private final CatalogsClient catalogs;
+
+ /**
+ * Gets the CatalogsClient object to access its operations.
+ *
+ * @return the CatalogsClient object.
+ */
+ public CatalogsClient getCatalogs() {
+ return this.catalogs;
+ }
+
+ /** The CertificatesClient object to access its operations. */
+ private final CertificatesClient certificates;
+
+ /**
+ * Gets the CertificatesClient object to access its operations.
+ *
+ * @return the CertificatesClient object.
+ */
+ public CertificatesClient getCertificates() {
+ return this.certificates;
+ }
+
+ /** The ImagesClient object to access its operations. */
+ private final ImagesClient images;
+
+ /**
+ * Gets the ImagesClient object to access its operations.
+ *
+ * @return the ImagesClient object.
+ */
+ public ImagesClient getImages() {
+ return this.images;
+ }
+
+ /** The ProductsClient object to access its operations. */
+ private final ProductsClient products;
+
+ /**
+ * Gets the ProductsClient object to access its operations.
+ *
+ * @return the ProductsClient object.
+ */
+ public ProductsClient getProducts() {
+ return this.products;
+ }
+
+ /** The DeviceGroupsClient object to access its operations. */
+ private final DeviceGroupsClient deviceGroups;
+
+ /**
+ * Gets the DeviceGroupsClient object to access its operations.
+ *
+ * @return the DeviceGroupsClient object.
+ */
+ public DeviceGroupsClient getDeviceGroups() {
+ return this.deviceGroups;
+ }
+
+ /** The DeploymentsClient object to access its operations. */
+ private final DeploymentsClient deployments;
+
+ /**
+ * Gets the DeploymentsClient object to access its operations.
+ *
+ * @return the DeploymentsClient object.
+ */
+ public DeploymentsClient getDeployments() {
+ return this.deployments;
+ }
+
+ /** The DevicesClient object to access its operations. */
+ private final DevicesClient devices;
+
+ /**
+ * Gets the DevicesClient object to access its operations.
+ *
+ * @return the DevicesClient object.
+ */
+ public DevicesClient getDevices() {
+ return this.devices;
+ }
+
+ /**
+ * Initializes an instance of AzureSphereManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription.
+ * @param endpoint server parameter.
+ */
+ AzureSphereManagementClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2022-09-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.catalogs = new CatalogsClientImpl(this);
+ this.certificates = new CertificatesClientImpl(this);
+ this.images = new ImagesClientImpl(this);
+ this.products = new ProductsClientImpl(this);
+ this.deviceGroups = new DeviceGroupsClientImpl(this);
+ this.deployments = new DeploymentsClientImpl(this);
+ this.devices = new DevicesClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(
+ Mono>> activationResponse,
+ HttpPipeline httpPipeline,
+ Type pollResultType,
+ Type finalResultType,
+ Context context) {
+ return PollerFactory
+ .create(
+ serializerAdapter,
+ httpPipeline,
+ pollResultType,
+ finalResultType,
+ defaultPollInterval,
+ activationResponse,
+ context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse =
+ new HttpResponseImpl(
+ lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError =
+ this
+ .getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(s);
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(AzureSphereManagementClientImpl.class);
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogImpl.java
new file mode 100644
index 000000000000..e36df7131263
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogImpl.java
@@ -0,0 +1,251 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sphere.fluent.models.CatalogInner;
+import com.azure.resourcemanager.sphere.models.Catalog;
+import com.azure.resourcemanager.sphere.models.CatalogUpdate;
+import com.azure.resourcemanager.sphere.models.CountDeviceResponse;
+import com.azure.resourcemanager.sphere.models.Deployment;
+import com.azure.resourcemanager.sphere.models.Device;
+import com.azure.resourcemanager.sphere.models.DeviceGroup;
+import com.azure.resourcemanager.sphere.models.DeviceInsight;
+import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
+import com.azure.resourcemanager.sphere.models.ProvisioningState;
+import java.util.Collections;
+import java.util.Map;
+
+public final class CatalogImpl implements Catalog, Catalog.Definition, Catalog.Update {
+ private CatalogInner innerObject;
+
+ private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public CatalogInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.sphere.AzureSphereManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String catalogName;
+
+ private CatalogUpdate updateProperties;
+
+ public CatalogImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Catalog create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCatalogs()
+ .createOrUpdate(resourceGroupName, catalogName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Catalog create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCatalogs()
+ .createOrUpdate(resourceGroupName, catalogName, this.innerModel(), context);
+ return this;
+ }
+
+ CatalogImpl(String name, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) {
+ this.innerObject = new CatalogInner();
+ this.serviceManager = serviceManager;
+ this.catalogName = name;
+ }
+
+ public CatalogImpl update() {
+ this.updateProperties = new CatalogUpdate();
+ return this;
+ }
+
+ public Catalog apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCatalogs()
+ .updateWithResponse(resourceGroupName, catalogName, updateProperties, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Catalog apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCatalogs()
+ .updateWithResponse(resourceGroupName, catalogName, updateProperties, context)
+ .getValue();
+ return this;
+ }
+
+ CatalogImpl(CatalogInner innerObject, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.catalogName = Utils.getValueFromIdByName(innerObject.id(), "catalogs");
+ }
+
+ public Catalog refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCatalogs()
+ .getByResourceGroupWithResponse(resourceGroupName, catalogName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Catalog refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCatalogs()
+ .getByResourceGroupWithResponse(resourceGroupName, catalogName, context)
+ .getValue();
+ return this;
+ }
+
+ public Response countDevicesWithResponse(Context context) {
+ return serviceManager.catalogs().countDevicesWithResponse(resourceGroupName, catalogName, context);
+ }
+
+ public CountDeviceResponse countDevices() {
+ return serviceManager.catalogs().countDevices(resourceGroupName, catalogName);
+ }
+
+ public PagedIterable listDeployments() {
+ return serviceManager.catalogs().listDeployments(resourceGroupName, catalogName);
+ }
+
+ public PagedIterable listDeployments(
+ String filter, Integer top, Integer skip, Integer maxpagesize, Context context) {
+ return serviceManager
+ .catalogs()
+ .listDeployments(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context);
+ }
+
+ public PagedIterable listDeviceGroups(ListDeviceGroupsRequest listDeviceGroupsRequest) {
+ return serviceManager.catalogs().listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest);
+ }
+
+ public PagedIterable listDeviceGroups(
+ ListDeviceGroupsRequest listDeviceGroupsRequest,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return serviceManager
+ .catalogs()
+ .listDeviceGroups(
+ resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize, context);
+ }
+
+ public PagedIterable listDeviceInsights() {
+ return serviceManager.catalogs().listDeviceInsights(resourceGroupName, catalogName);
+ }
+
+ public PagedIterable listDeviceInsights(
+ String filter, Integer top, Integer skip, Integer maxpagesize, Context context) {
+ return serviceManager
+ .catalogs()
+ .listDeviceInsights(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context);
+ }
+
+ public PagedIterable listDevices() {
+ return serviceManager.catalogs().listDevices(resourceGroupName, catalogName);
+ }
+
+ public PagedIterable listDevices(
+ String filter, Integer top, Integer skip, Integer maxpagesize, Context context) {
+ return serviceManager
+ .catalogs()
+ .listDevices(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context);
+ }
+
+ public CatalogImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public CatalogImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public CatalogImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsClientImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsClientImpl.java
new file mode 100644
index 000000000000..aab63c3693db
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsClientImpl.java
@@ -0,0 +1,3079 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.sphere.fluent.CatalogsClient;
+import com.azure.resourcemanager.sphere.fluent.models.CatalogInner;
+import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner;
+import com.azure.resourcemanager.sphere.models.CatalogListResult;
+import com.azure.resourcemanager.sphere.models.CatalogUpdate;
+import com.azure.resourcemanager.sphere.models.DeploymentListResult;
+import com.azure.resourcemanager.sphere.models.DeviceGroupListResult;
+import com.azure.resourcemanager.sphere.models.DeviceListResult;
+import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
+import com.azure.resourcemanager.sphere.models.PagedDeviceInsight;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CatalogsClient. */
+public final class CatalogsClientImpl implements CatalogsClient {
+ /** The proxy service used to perform REST calls. */
+ private final CatalogsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureSphereManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CatalogsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CatalogsClientImpl(AzureSphereManagementClientImpl client) {
+ this.service = RestProxy.create(CatalogsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureSphereManagementClientCatalogs to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureSphereManagemen")
+ public interface CatalogsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @BodyParam("application/json") CatalogInner resource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @BodyParam("application/json") CatalogUpdate properties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> countDevices(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeployments")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listDeployments(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top,
+ @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listDeviceGroups(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top,
+ @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize,
+ @BodyParam("application/json") ListDeviceGroupsRequest listDeviceGroupsRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listDeviceInsights(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top,
+ @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listDevices(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("catalogName") String catalogName,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$top") Integer top,
+ @QueryParam("$skip") Integer skip,
+ @QueryParam("$maxpagesize") Integer maxpagesize,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listDeploymentsNext(
+ @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> listDeviceGroupsNext(
+ @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> listDeviceInsightsNext(
+ @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> listDevicesNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List Catalog resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List Catalog resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Catalog along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String catalogName) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @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 Catalog along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String catalogName, 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Catalog on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String catalogName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, catalogName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @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 Catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String catalogName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, catalogName, context).block();
+ }
+
+ /**
+ * Get a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CatalogInner getByResourceGroup(String resourceGroupName, String catalogName) {
+ return getByResourceGroupWithResponse(resourceGroupName, catalogName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String catalogName, CatalogInner resource) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ resource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String catalogName, CatalogInner resource, 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ resource,
+ accept,
+ context);
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CatalogInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String catalogName, CatalogInner resource) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, catalogName, resource);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), CatalogInner.class, CatalogInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CatalogInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String catalogName, CatalogInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, catalogName, resource, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), CatalogInner.class, CatalogInner.class, context);
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CatalogInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, CatalogInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CatalogInner> beginCreateOrUpdate(
+ String resourceGroupName, String catalogName, CatalogInner resource, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String catalogName, CatalogInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String catalogName, CatalogInner resource, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, catalogName, resource, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CatalogInner createOrUpdate(String resourceGroupName, String catalogName, CatalogInner resource) {
+ return createOrUpdateAsync(resourceGroupName, catalogName, resource).block();
+ }
+
+ /**
+ * Create a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CatalogInner createOrUpdate(
+ String resourceGroupName, String catalogName, CatalogInner resource, Context context) {
+ return createOrUpdateAsync(resourceGroupName, catalogName, resource, context).block();
+ }
+
+ /**
+ * Update a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String catalogName, CatalogUpdate properties) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ properties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String catalogName, CatalogUpdate properties, 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ properties,
+ accept,
+ context);
+ }
+
+ /**
+ * Update a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String catalogName, CatalogUpdate properties) {
+ return updateWithResponseAsync(resourceGroupName, catalogName, properties)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String catalogName, CatalogUpdate properties, Context context) {
+ return updateWithResponseAsync(resourceGroupName, catalogName, properties, context).block();
+ }
+
+ /**
+ * Update a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure Sphere catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CatalogInner update(String resourceGroupName, String catalogName, CatalogUpdate properties) {
+ return updateWithResponse(resourceGroupName, catalogName, properties, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String catalogName) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String catalogName, 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String catalogName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String catalogName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, catalogName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName) {
+ return this.beginDeleteAsync(resourceGroupName, catalogName).getSyncPoller();
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String catalogName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, catalogName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String catalogName) {
+ return beginDeleteAsync(resourceGroupName, catalogName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String catalogName, Context context) {
+ return beginDeleteAsync(resourceGroupName, catalogName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String catalogName) {
+ deleteAsync(resourceGroupName, catalogName).block();
+ }
+
+ /**
+ * Delete a Catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String catalogName, Context context) {
+ deleteAsync(resourceGroupName, catalogName, context).block();
+ }
+
+ /**
+ * Counts devices in catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> countDevicesWithResponseAsync(
+ String resourceGroupName, String catalogName) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .countDevices(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Counts devices in catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @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 response to the action call for count devices in a catalog along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> countDevicesWithResponseAsync(
+ String resourceGroupName, String catalogName, 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .countDevices(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ accept,
+ context);
+ }
+
+ /**
+ * Counts devices in catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono countDevicesAsync(String resourceGroupName, String catalogName) {
+ return countDevicesWithResponseAsync(resourceGroupName, catalogName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Counts devices in catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @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 response to the action call for count devices in a catalog along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response countDevicesWithResponse(
+ String resourceGroupName, String catalogName, Context context) {
+ return countDevicesWithResponseAsync(resourceGroupName, catalogName, context).block();
+ }
+
+ /**
+ * Counts devices in catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response to the action call for count devices in a catalog.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CountDeviceResponseInner countDevices(String resourceGroupName, String catalogName) {
+ return countDevicesWithResponse(resourceGroupName, catalogName, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeploymentsSinglePageAsync(
+ String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listDeployments(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeploymentsSinglePageAsync(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listDeployments(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeploymentsAsync(
+ String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) {
+ return new PagedFlux<>(
+ () -> listDeploymentsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize),
+ nextLink -> listDeploymentsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeploymentsAsync(String resourceGroupName, String catalogName) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedFlux<>(
+ () -> listDeploymentsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize),
+ nextLink -> listDeploymentsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeploymentsAsync(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listDeploymentsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context),
+ nextLink -> listDeploymentsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeployments(String resourceGroupName, String catalogName) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedIterable<>(
+ listDeploymentsAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize));
+ }
+
+ /**
+ * Lists deployments for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeployments(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedIterable<>(
+ listDeploymentsAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context));
+ }
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceGroupsSinglePageAsync(
+ String resourceGroupName,
+ String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ if (listDeviceGroupsRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter listDeviceGroupsRequest is required and cannot be null."));
+ } else {
+ listDeviceGroupsRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listDeviceGroups(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ listDeviceGroupsRequest,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceGroupsSinglePageAsync(
+ String resourceGroupName,
+ String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ if (listDeviceGroupsRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter listDeviceGroupsRequest is required and cannot be null."));
+ } else {
+ listDeviceGroupsRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listDeviceGroups(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ listDeviceGroupsRequest,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeviceGroupsAsync(
+ String resourceGroupName,
+ String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize) {
+ return new PagedFlux<>(
+ () ->
+ listDeviceGroupsSinglePageAsync(
+ resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize),
+ nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeviceGroupsAsync(
+ String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedFlux<>(
+ () ->
+ listDeviceGroupsSinglePageAsync(
+ resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize),
+ nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeviceGroupsAsync(
+ String resourceGroupName,
+ String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listDeviceGroupsSinglePageAsync(
+ resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize, context),
+ nextLink -> listDeviceGroupsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceGroups(
+ String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedIterable<>(
+ listDeviceGroupsAsync(
+ resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize));
+ }
+
+ /**
+ * List the device groups for the catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param listDeviceGroupsRequest List device groups for catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceGroups(
+ String resourceGroupName,
+ String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedIterable<>(
+ listDeviceGroupsAsync(
+ resourceGroupName, catalogName, listDeviceGroupsRequest, filter, top, skip, maxpagesize, context));
+ }
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceInsightsSinglePageAsync(
+ String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listDeviceInsights(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @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 paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceInsightsSinglePageAsync(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listDeviceInsights(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of DeviceInsight items as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeviceInsightsAsync(
+ String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) {
+ return new PagedFlux<>(
+ () -> listDeviceInsightsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize),
+ nextLink -> listDeviceInsightsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of DeviceInsight items as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeviceInsightsAsync(String resourceGroupName, String catalogName) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedFlux<>(
+ () -> listDeviceInsightsSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize),
+ nextLink -> listDeviceInsightsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @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 paged collection of DeviceInsight items as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDeviceInsightsAsync(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listDeviceInsightsSinglePageAsync(
+ resourceGroupName, catalogName, filter, top, skip, maxpagesize, context),
+ nextLink -> listDeviceInsightsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceInsights(String resourceGroupName, String catalogName) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedIterable<>(
+ listDeviceInsightsAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize));
+ }
+
+ /**
+ * Lists device insights for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @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 paged collection of DeviceInsight items as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceInsights(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedIterable<>(
+ listDeviceInsightsAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context));
+ }
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDevicesSinglePageAsync(
+ String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) {
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listDevices(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDevicesSinglePageAsync(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ 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 (catalogName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter catalogName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listDevices(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ catalogName,
+ filter,
+ top,
+ skip,
+ maxpagesize,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDevicesAsync(
+ String resourceGroupName, String catalogName, String filter, Integer top, Integer skip, Integer maxpagesize) {
+ return new PagedFlux<>(
+ () -> listDevicesSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize),
+ nextLink -> listDevicesNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDevicesAsync(String resourceGroupName, String catalogName) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedFlux<>(
+ () -> listDevicesSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize),
+ nextLink -> listDevicesNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listDevicesAsync(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedFlux<>(
+ () -> listDevicesSinglePageAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context),
+ nextLink -> listDevicesNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDevices(String resourceGroupName, String catalogName) {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxpagesize = null;
+ return new PagedIterable<>(listDevicesAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize));
+ }
+
+ /**
+ * Lists devices for catalog.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param filter Filter the result list using the given expression.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxpagesize The maximum number of result items per page.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Device list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDevices(
+ String resourceGroupName,
+ String catalogName,
+ String filter,
+ Integer top,
+ Integer skip,
+ Integer maxpagesize,
+ Context context) {
+ return new PagedIterable<>(
+ listDevicesAsync(resourceGroupName, catalogName, filter, top, skip, maxpagesize, context));
+ }
+
+ /**
+ * 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 the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * 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 the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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
+ .listBySubscriptionNext(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 the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * 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 the response of a Catalog list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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
+ .listByResourceGroupNext(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 the response of a Deployment list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeploymentsNextSinglePageAsync(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.listDeploymentsNext(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 the response of a Deployment list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeploymentsNextSinglePageAsync(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
+ .listDeploymentsNext(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 the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceGroupsNextSinglePageAsync(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.listDeviceGroupsNext(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 the response of a DeviceGroup list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceGroupsNextSinglePageAsync(
+ 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
+ .listDeviceGroupsNext(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 paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceInsightsNextSinglePageAsync(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.listDeviceInsightsNext(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 paged collection of DeviceInsight items along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDeviceInsightsNextSinglePageAsync(
+ 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
+ .listDeviceInsightsNext(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 the response of a Device list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDevicesNextSinglePageAsync(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.listDevicesNext(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 the response of a Device list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listDevicesNextSinglePageAsync(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
+ .listDevicesNext(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/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsImpl.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsImpl.java
new file mode 100644
index 000000000000..7204f29b10d9
--- /dev/null
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/implementation/CatalogsImpl.java
@@ -0,0 +1,287 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sphere.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.sphere.fluent.CatalogsClient;
+import com.azure.resourcemanager.sphere.fluent.models.CatalogInner;
+import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceInner;
+import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner;
+import com.azure.resourcemanager.sphere.models.Catalog;
+import com.azure.resourcemanager.sphere.models.Catalogs;
+import com.azure.resourcemanager.sphere.models.CountDeviceResponse;
+import com.azure.resourcemanager.sphere.models.Deployment;
+import com.azure.resourcemanager.sphere.models.Device;
+import com.azure.resourcemanager.sphere.models.DeviceGroup;
+import com.azure.resourcemanager.sphere.models.DeviceInsight;
+import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
+
+public final class CatalogsImpl implements Catalogs {
+ private static final ClientLogger LOGGER = new ClientLogger(CatalogsImpl.class);
+
+ private final CatalogsClient innerClient;
+
+ private final com.azure.resourcemanager.sphere.AzureSphereManager serviceManager;
+
+ public CatalogsImpl(
+ CatalogsClient innerClient, com.azure.resourcemanager.sphere.AzureSphereManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new CatalogImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new CatalogImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new CatalogImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new CatalogImpl(inner1, this.manager()));
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String catalogName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, catalogName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CatalogImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Catalog getByResourceGroup(String resourceGroupName, String catalogName) {
+ CatalogInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, catalogName);
+ if (inner != null) {
+ return new CatalogImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String catalogName) {
+ this.serviceClient().delete(resourceGroupName, catalogName);
+ }
+
+ public void delete(String resourceGroupName, String catalogName, Context context) {
+ this.serviceClient().delete(resourceGroupName, catalogName, context);
+ }
+
+ public Response countDevicesWithResponse(
+ String resourceGroupName, String catalogName, Context context) {
+ Response