diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 7ba5bf3701b63..3b71f68bbeba8 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -300,6 +300,7 @@ com.azure.resourcemanager:azure-resourcemanager-maps;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-botservice;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-recoveryservicesbackup;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-deviceprovisioningservices;1.0.0;1.1.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index ecd2255183748..a77e2ff99f2d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -810,6 +810,7 @@
sdk/storage
sdk/storagecache
sdk/storageimportexport
+ sdk/storagepool
sdk/streamanalytics
sdk/subscription
sdk/support
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/CHANGELOG.md b/sdk/storagepool/azure-resourcemanager-storagepool/CHANGELOG.md
new file mode 100644
index 0000000000000..e2396a4d497d8
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-06-23)
+
+- Azure Resource Manager StoragePool client library for Java. This package contains Microsoft Azure SDK for StoragePool Management SDK. Package tag package-2021-04-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/README.md b/sdk/storagepool/azure-resourcemanager-storagepool/README.md
new file mode 100644
index 0000000000000..e4c0754e36830
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/README.md
@@ -0,0 +1,101 @@
+# Azure Resource Manager StoragePool client library for Java
+
+Azure Resource Manager StoragePool client library for Java.
+
+This package contains Microsoft Azure SDK for StoragePool Management SDK. Package tag package-2021-04-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-storagepool;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-storagepool
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+StoragePoolManager manager = StoragePoolManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/pom.xml b/sdk/storagepool/azure-resourcemanager-storagepool/pom.xml
new file mode 100644
index 0000000000000..4688b10d7e011
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-storagepool
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for StoragePool Management
+ This package contains Microsoft Azure SDK for StoragePool Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-04-01-preview.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.17.0
+
+
+ com.azure
+ azure-core-management
+ 1.3.0
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/StoragePoolManager.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/StoragePoolManager.java
new file mode 100644
index 0000000000000..9f11cd93ebf72
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/StoragePoolManager.java
@@ -0,0 +1,263 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.fluent.StoragePoolManagement;
+import com.azure.resourcemanager.storagepool.implementation.DiskPoolZonesImpl;
+import com.azure.resourcemanager.storagepool.implementation.DiskPoolsImpl;
+import com.azure.resourcemanager.storagepool.implementation.IscsiTargetsImpl;
+import com.azure.resourcemanager.storagepool.implementation.OperationsImpl;
+import com.azure.resourcemanager.storagepool.implementation.StoragePoolManagementBuilder;
+import com.azure.resourcemanager.storagepool.models.DiskPoolZones;
+import com.azure.resourcemanager.storagepool.models.DiskPools;
+import com.azure.resourcemanager.storagepool.models.IscsiTargets;
+import com.azure.resourcemanager.storagepool.models.Operations;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to StoragePoolManager. */
+public final class StoragePoolManager {
+ private Operations operations;
+
+ private DiskPools diskPools;
+
+ private DiskPoolZones diskPoolZones;
+
+ private IscsiTargets iscsiTargets;
+
+ private final StoragePoolManagement clientObject;
+
+ private StoragePoolManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new StoragePoolManagementBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of StoragePool service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the StoragePool service API instance.
+ */
+ public static StoragePoolManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create StoragePoolManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new StoragePoolManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ 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 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, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of StoragePool service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the StoragePool service API instance.
+ */
+ public StoragePoolManager 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.storagepool")
+ .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) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies);
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new StoragePoolManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of DiskPools. */
+ public DiskPools diskPools() {
+ if (this.diskPools == null) {
+ this.diskPools = new DiskPoolsImpl(clientObject.getDiskPools(), this);
+ }
+ return diskPools;
+ }
+
+ /** @return Resource collection API of DiskPoolZones. */
+ public DiskPoolZones diskPoolZones() {
+ if (this.diskPoolZones == null) {
+ this.diskPoolZones = new DiskPoolZonesImpl(clientObject.getDiskPoolZones(), this);
+ }
+ return diskPoolZones;
+ }
+
+ /** @return Resource collection API of IscsiTargets. */
+ public IscsiTargets iscsiTargets() {
+ if (this.iscsiTargets == null) {
+ this.iscsiTargets = new IscsiTargetsImpl(clientObject.getIscsiTargets(), this);
+ }
+ return iscsiTargets;
+ }
+
+ /**
+ * @return Wrapped service client StoragePoolManagement providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public StoragePoolManagement serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/DiskPoolZonesClient.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/DiskPoolZonesClient.java
new file mode 100644
index 0000000000000..d0f1218ac434a
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/DiskPoolZonesClient.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.storagepool.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.storagepool.fluent.models.DiskPoolZoneInfoInner;
+
+/** An instance of this class provides access to all the operations defined in DiskPoolZonesClient. */
+public interface DiskPoolZonesClient {
+ /**
+ * Lists available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String location);
+
+ /**
+ * Lists available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String location, Context context);
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/DiskPoolsClient.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/DiskPoolsClient.java
new file mode 100644
index 0000000000000..2f544b54b2afa
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/DiskPoolsClient.java
@@ -0,0 +1,406 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.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.storagepool.fluent.models.DiskPoolInner;
+import com.azure.resourcemanager.storagepool.fluent.models.OutboundEnvironmentEndpointInner;
+import com.azure.resourcemanager.storagepool.models.DiskPoolCreate;
+import com.azure.resourcemanager.storagepool.models.DiskPoolUpdate;
+
+/** An instance of this class provides access to all the operations defined in DiskPoolsClient. */
+public interface DiskPoolsClient {
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @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 Disk Pools in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @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 Disk Pools in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DiskPoolInner> beginCreateOrUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload);
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DiskPoolInner> beginCreateOrUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload, Context context);
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiskPoolInner createOrUpdate(String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload);
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiskPoolInner createOrUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload, Context context);
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DiskPoolInner> beginUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload);
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DiskPoolInner> beginUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload, Context context);
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiskPoolInner update(String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload);
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiskPoolInner update(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload, Context context);
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String diskPoolName);
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String diskPoolName);
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * Get a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiskPoolInner getByResourceGroup(String resourceGroupName, String diskPoolName);
+
+ /**
+ * Get a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listOutboundNetworkDependenciesEndpoints(
+ String resourceGroupName, String diskPoolName);
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listOutboundNetworkDependenciesEndpoints(
+ String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginStart(String resourceGroupName, String diskPoolName);
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginStart(String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String diskPoolName);
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDeallocate(String resourceGroupName, String diskPoolName);
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDeallocate(String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void deallocate(String resourceGroupName, String diskPoolName);
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void deallocate(String resourceGroupName, String diskPoolName, Context context);
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/IscsiTargetsClient.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/IscsiTargetsClient.java
new file mode 100644
index 0000000000000..caba664bbfa2c
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/IscsiTargetsClient.java
@@ -0,0 +1,294 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.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.storagepool.fluent.models.IscsiTargetInner;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetCreate;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetUpdate;
+
+/** An instance of this class provides access to all the operations defined in IscsiTargetsClient. */
+public interface IscsiTargetsClient {
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName);
+
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName, Context context);
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IscsiTargetInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload);
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IscsiTargetInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload,
+ Context context);
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IscsiTargetInner createOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload);
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IscsiTargetInner createOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload,
+ Context context);
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IscsiTargetInner> beginUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload);
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IscsiTargetInner> beginUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload,
+ Context context);
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IscsiTargetInner update(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload);
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IscsiTargetInner update(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload,
+ Context context);
+
+ /**
+ * Delete an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String diskPoolName, String iscsiTargetName);
+
+ /**
+ * Delete an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String diskPoolName, String iscsiTargetName, Context context);
+
+ /**
+ * Delete an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @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 diskPoolName, String iscsiTargetName);
+
+ /**
+ * Delete an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @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 diskPoolName, String iscsiTargetName, Context context);
+
+ /**
+ * Get an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @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 iSCSI Target.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IscsiTargetInner get(String resourceGroupName, String diskPoolName, String iscsiTargetName);
+
+ /**
+ * Get an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @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 iSCSI Target.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String diskPoolName, String iscsiTargetName, Context context);
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/OperationsClient.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..9a803ae5ad685
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.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.storagepool.fluent.models.StoragePoolRPOperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Gets a list of StoragePool operations.
+ *
+ * @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 StoragePool operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of StoragePool operations.
+ *
+ * @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 StoragePool operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/StoragePoolManagement.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/StoragePoolManagement.java
new file mode 100644
index 0000000000000..088441855d825
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/StoragePoolManagement.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.storagepool.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for StoragePoolManagement class. */
+public interface StoragePoolManagement {
+ /**
+ * 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 DiskPoolsClient object to access its operations.
+ *
+ * @return the DiskPoolsClient object.
+ */
+ DiskPoolsClient getDiskPools();
+
+ /**
+ * Gets the DiskPoolZonesClient object to access its operations.
+ *
+ * @return the DiskPoolZonesClient object.
+ */
+ DiskPoolZonesClient getDiskPoolZones();
+
+ /**
+ * Gets the IscsiTargetsClient object to access its operations.
+ *
+ * @return the IscsiTargetsClient object.
+ */
+ IscsiTargetsClient getIscsiTargets();
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolInner.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolInner.java
new file mode 100644
index 0000000000000..c77c238caafad
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolInner.java
@@ -0,0 +1,280 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.models.Disk;
+import com.azure.resourcemanager.storagepool.models.OperationalStatus;
+import com.azure.resourcemanager.storagepool.models.ProvisioningStates;
+import com.azure.resourcemanager.storagepool.models.SystemMetadata;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** Response for Disk Pool request. */
+@JsonFlatten
+@Fluent
+public class DiskPoolInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolInner.class);
+
+ /*
+ * Resource metadata required by ARM RPC
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemMetadata systemData;
+
+ /*
+ * State of the operation on the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", required = true, access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningStates provisioningState;
+
+ /*
+ * Logical zone for Disk Pool resource; example: ["1"].
+ */
+ @JsonProperty(value = "properties.availabilityZones", required = true)
+ private List availabilityZones;
+
+ /*
+ * Operational status of the Disk Pool.
+ */
+ @JsonProperty(value = "properties.status", required = true)
+ private OperationalStatus status;
+
+ /*
+ * List of Azure Managed Disks to attach to a Disk Pool.
+ */
+ @JsonProperty(value = "properties.disks")
+ private List disks;
+
+ /*
+ * Azure Resource ID of a Subnet for the Disk Pool.
+ */
+ @JsonProperty(value = "properties.subnetId", required = true)
+ private String subnetId;
+
+ /*
+ * List of additional capabilities for Disk Pool.
+ */
+ @JsonProperty(value = "properties.additionalCapabilities")
+ private List additionalCapabilities;
+
+ /*
+ * Sku name
+ */
+ @JsonProperty(value = "sku.name")
+ private String nameSkuName;
+
+ /*
+ * Sku tier
+ */
+ @JsonProperty(value = "sku.tier")
+ private String tier;
+
+ /**
+ * Get the systemData property: Resource metadata required by ARM RPC.
+ *
+ * @return the systemData value.
+ */
+ public SystemMetadata systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the provisioningState property: State of the operation on the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStates provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the availabilityZones property: Logical zone for Disk Pool resource; example: ["1"].
+ *
+ * @return the availabilityZones value.
+ */
+ public List availabilityZones() {
+ return this.availabilityZones;
+ }
+
+ /**
+ * Set the availabilityZones property: Logical zone for Disk Pool resource; example: ["1"].
+ *
+ * @param availabilityZones the availabilityZones value to set.
+ * @return the DiskPoolInner object itself.
+ */
+ public DiskPoolInner withAvailabilityZones(List availabilityZones) {
+ this.availabilityZones = availabilityZones;
+ return this;
+ }
+
+ /**
+ * Get the status property: Operational status of the Disk Pool.
+ *
+ * @return the status value.
+ */
+ public OperationalStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Operational status of the Disk Pool.
+ *
+ * @param status the status value to set.
+ * @return the DiskPoolInner object itself.
+ */
+ public DiskPoolInner withStatus(OperationalStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the disks property: List of Azure Managed Disks to attach to a Disk Pool.
+ *
+ * @return the disks value.
+ */
+ public List disks() {
+ return this.disks;
+ }
+
+ /**
+ * Set the disks property: List of Azure Managed Disks to attach to a Disk Pool.
+ *
+ * @param disks the disks value to set.
+ * @return the DiskPoolInner object itself.
+ */
+ public DiskPoolInner withDisks(List disks) {
+ this.disks = disks;
+ return this;
+ }
+
+ /**
+ * Get the subnetId property: Azure Resource ID of a Subnet for the Disk Pool.
+ *
+ * @return the subnetId value.
+ */
+ public String subnetId() {
+ return this.subnetId;
+ }
+
+ /**
+ * Set the subnetId property: Azure Resource ID of a Subnet for the Disk Pool.
+ *
+ * @param subnetId the subnetId value to set.
+ * @return the DiskPoolInner object itself.
+ */
+ public DiskPoolInner withSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ return this;
+ }
+
+ /**
+ * Get the additionalCapabilities property: List of additional capabilities for Disk Pool.
+ *
+ * @return the additionalCapabilities value.
+ */
+ public List additionalCapabilities() {
+ return this.additionalCapabilities;
+ }
+
+ /**
+ * Set the additionalCapabilities property: List of additional capabilities for Disk Pool.
+ *
+ * @param additionalCapabilities the additionalCapabilities value to set.
+ * @return the DiskPoolInner object itself.
+ */
+ public DiskPoolInner withAdditionalCapabilities(List additionalCapabilities) {
+ this.additionalCapabilities = additionalCapabilities;
+ return this;
+ }
+
+ /**
+ * Get the nameSkuName property: Sku name.
+ *
+ * @return the nameSkuName value.
+ */
+ public String nameSkuName() {
+ return this.nameSkuName;
+ }
+
+ /**
+ * Set the nameSkuName property: Sku name.
+ *
+ * @param nameSkuName the nameSkuName value to set.
+ * @return the DiskPoolInner object itself.
+ */
+ public DiskPoolInner withNameSkuName(String nameSkuName) {
+ this.nameSkuName = nameSkuName;
+ return this;
+ }
+
+ /**
+ * Get the tier property: Sku tier.
+ *
+ * @return the tier value.
+ */
+ public String tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set the tier property: Sku tier.
+ *
+ * @param tier the tier value to set.
+ * @return the DiskPoolInner object itself.
+ */
+ public DiskPoolInner withTier(String tier) {
+ this.tier = tier;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public DiskPoolInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public DiskPoolInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (systemData() != null) {
+ systemData().validate();
+ }
+ if (availabilityZones() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property availabilityZones in model DiskPoolInner"));
+ }
+ if (status() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property status in model DiskPoolInner"));
+ }
+ if (disks() != null) {
+ disks().forEach(e -> e.validate());
+ }
+ if (subnetId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property subnetId in model DiskPoolInner"));
+ }
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolZoneInfoInner.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolZoneInfoInner.java
new file mode 100644
index 0000000000000..1e52e917d24f8
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolZoneInfoInner.java
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.models.Sku;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Disk Pool Sku Details. */
+@Fluent
+public final class DiskPoolZoneInfoInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolZoneInfoInner.class);
+
+ /*
+ * Logical zone for Disk Pool resource; example: ["1"].
+ */
+ @JsonProperty(value = "availabilityZones")
+ private List availabilityZones;
+
+ /*
+ * List of additional capabilities for Disk Pool.
+ */
+ @JsonProperty(value = "additionalCapabilities")
+ private List additionalCapabilities;
+
+ /*
+ * Determines the SKU of VM deployed for Disk Pool
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * Get the availabilityZones property: Logical zone for Disk Pool resource; example: ["1"].
+ *
+ * @return the availabilityZones value.
+ */
+ public List availabilityZones() {
+ return this.availabilityZones;
+ }
+
+ /**
+ * Set the availabilityZones property: Logical zone for Disk Pool resource; example: ["1"].
+ *
+ * @param availabilityZones the availabilityZones value to set.
+ * @return the DiskPoolZoneInfoInner object itself.
+ */
+ public DiskPoolZoneInfoInner withAvailabilityZones(List availabilityZones) {
+ this.availabilityZones = availabilityZones;
+ return this;
+ }
+
+ /**
+ * Get the additionalCapabilities property: List of additional capabilities for Disk Pool.
+ *
+ * @return the additionalCapabilities value.
+ */
+ public List additionalCapabilities() {
+ return this.additionalCapabilities;
+ }
+
+ /**
+ * Set the additionalCapabilities property: List of additional capabilities for Disk Pool.
+ *
+ * @param additionalCapabilities the additionalCapabilities value to set.
+ * @return the DiskPoolZoneInfoInner object itself.
+ */
+ public DiskPoolZoneInfoInner withAdditionalCapabilities(List additionalCapabilities) {
+ this.additionalCapabilities = additionalCapabilities;
+ return this;
+ }
+
+ /**
+ * Get the sku property: Determines the SKU of VM deployed for Disk Pool.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: Determines the SKU of VM deployed for Disk Pool.
+ *
+ * @param sku the sku value to set.
+ * @return the DiskPoolZoneInfoInner object itself.
+ */
+ public DiskPoolZoneInfoInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() != null) {
+ sku().validate();
+ }
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetInner.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetInner.java
new file mode 100644
index 0000000000000..eb34089d40e2b
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetInner.java
@@ -0,0 +1,272 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.models.Acl;
+import com.azure.resourcemanager.storagepool.models.IscsiLun;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetAclMode;
+import com.azure.resourcemanager.storagepool.models.OperationalStatus;
+import com.azure.resourcemanager.storagepool.models.ProvisioningStates;
+import com.azure.resourcemanager.storagepool.models.SystemMetadata;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Response for iSCSI Target requests. */
+@JsonFlatten
+@Fluent
+public class IscsiTargetInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetInner.class);
+
+ /*
+ * Resource metadata required by ARM RPC
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemMetadata systemData;
+
+ /*
+ * Mode for Target connectivity.
+ */
+ @JsonProperty(value = "properties.aclMode", required = true)
+ private IscsiTargetAclMode aclMode;
+
+ /*
+ * Access Control List (ACL) for an iSCSI Target; defines LUN masking
+ * policy
+ */
+ @JsonProperty(value = "properties.staticAcls")
+ private List staticAcls;
+
+ /*
+ * List of LUNs to be exposed through iSCSI Target.
+ */
+ @JsonProperty(value = "properties.luns")
+ private List luns;
+
+ /*
+ * iSCSI Target IQN (iSCSI Qualified Name); example:
+ * "iqn.2005-03.org.iscsi:server".
+ */
+ @JsonProperty(value = "properties.targetIqn", required = true)
+ private String targetIqn;
+
+ /*
+ * State of the operation on the resource.
+ */
+ @JsonProperty(value = "properties.provisioningState", required = true, access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningStates provisioningState;
+
+ /*
+ * Operational status of the iSCSI Target.
+ */
+ @JsonProperty(value = "properties.status", required = true)
+ private OperationalStatus status;
+
+ /*
+ * List of private IPv4 addresses to connect to the iSCSI Target.
+ */
+ @JsonProperty(value = "properties.endpoints")
+ private List endpoints;
+
+ /*
+ * The port used by iSCSI Target portal group.
+ */
+ @JsonProperty(value = "properties.port")
+ private Integer port;
+
+ /**
+ * Get the systemData property: Resource metadata required by ARM RPC.
+ *
+ * @return the systemData value.
+ */
+ public SystemMetadata systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the aclMode property: Mode for Target connectivity.
+ *
+ * @return the aclMode value.
+ */
+ public IscsiTargetAclMode aclMode() {
+ return this.aclMode;
+ }
+
+ /**
+ * Set the aclMode property: Mode for Target connectivity.
+ *
+ * @param aclMode the aclMode value to set.
+ * @return the IscsiTargetInner object itself.
+ */
+ public IscsiTargetInner withAclMode(IscsiTargetAclMode aclMode) {
+ this.aclMode = aclMode;
+ return this;
+ }
+
+ /**
+ * Get the staticAcls property: Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.
+ *
+ * @return the staticAcls value.
+ */
+ public List staticAcls() {
+ return this.staticAcls;
+ }
+
+ /**
+ * Set the staticAcls property: Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.
+ *
+ * @param staticAcls the staticAcls value to set.
+ * @return the IscsiTargetInner object itself.
+ */
+ public IscsiTargetInner withStaticAcls(List staticAcls) {
+ this.staticAcls = staticAcls;
+ return this;
+ }
+
+ /**
+ * Get the luns property: List of LUNs to be exposed through iSCSI Target.
+ *
+ * @return the luns value.
+ */
+ public List luns() {
+ return this.luns;
+ }
+
+ /**
+ * Set the luns property: List of LUNs to be exposed through iSCSI Target.
+ *
+ * @param luns the luns value to set.
+ * @return the IscsiTargetInner object itself.
+ */
+ public IscsiTargetInner withLuns(List luns) {
+ this.luns = luns;
+ return this;
+ }
+
+ /**
+ * Get the targetIqn property: iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".
+ *
+ * @return the targetIqn value.
+ */
+ public String targetIqn() {
+ return this.targetIqn;
+ }
+
+ /**
+ * Set the targetIqn property: iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".
+ *
+ * @param targetIqn the targetIqn value to set.
+ * @return the IscsiTargetInner object itself.
+ */
+ public IscsiTargetInner withTargetIqn(String targetIqn) {
+ this.targetIqn = targetIqn;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of the operation on the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStates provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the status property: Operational status of the iSCSI Target.
+ *
+ * @return the status value.
+ */
+ public OperationalStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Operational status of the iSCSI Target.
+ *
+ * @param status the status value to set.
+ * @return the IscsiTargetInner object itself.
+ */
+ public IscsiTargetInner withStatus(OperationalStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the endpoints property: List of private IPv4 addresses to connect to the iSCSI Target.
+ *
+ * @return the endpoints value.
+ */
+ public List endpoints() {
+ return this.endpoints;
+ }
+
+ /**
+ * Set the endpoints property: List of private IPv4 addresses to connect to the iSCSI Target.
+ *
+ * @param endpoints the endpoints value to set.
+ * @return the IscsiTargetInner object itself.
+ */
+ public IscsiTargetInner withEndpoints(List endpoints) {
+ this.endpoints = endpoints;
+ return this;
+ }
+
+ /**
+ * Get the port property: The port used by iSCSI Target portal group.
+ *
+ * @return the port value.
+ */
+ public Integer port() {
+ return this.port;
+ }
+
+ /**
+ * Set the port property: The port used by iSCSI Target portal group.
+ *
+ * @param port the port value to set.
+ * @return the IscsiTargetInner object itself.
+ */
+ public IscsiTargetInner withPort(Integer port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (systemData() != null) {
+ systemData().validate();
+ }
+ if (aclMode() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property aclMode in model IscsiTargetInner"));
+ }
+ if (staticAcls() != null) {
+ staticAcls().forEach(e -> e.validate());
+ }
+ if (luns() != null) {
+ luns().forEach(e -> e.validate());
+ }
+ if (targetIqn() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property targetIqn in model IscsiTargetInner"));
+ }
+ if (status() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property status in model IscsiTargetInner"));
+ }
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/OutboundEnvironmentEndpointInner.java
new file mode 100644
index 0000000000000..3b7a62c19bc0c
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/OutboundEnvironmentEndpointInner.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.storagepool.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.models.EndpointDependency;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Endpoints accessed for a common purpose that the App Service Environment requires outbound network access to. */
+@Fluent
+public final class OutboundEnvironmentEndpointInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OutboundEnvironmentEndpointInner.class);
+
+ /*
+ * The type of service accessed by the App Service Environment, e.g., Azure
+ * Storage, Azure SQL Database, and Azure Active Directory.
+ */
+ @JsonProperty(value = "category")
+ private String category;
+
+ /*
+ * The endpoints that the App Service Environment reaches the service at.
+ */
+ @JsonProperty(value = "endpoints")
+ private List endpoints;
+
+ /**
+ * Get the category property: The type of service accessed by the App Service Environment, e.g., Azure Storage,
+ * Azure SQL Database, and Azure Active Directory.
+ *
+ * @return the category value.
+ */
+ public String category() {
+ return this.category;
+ }
+
+ /**
+ * Set the category property: The type of service accessed by the App Service Environment, e.g., Azure Storage,
+ * Azure SQL Database, and Azure Active Directory.
+ *
+ * @param category the category value to set.
+ * @return the OutboundEnvironmentEndpointInner object itself.
+ */
+ public OutboundEnvironmentEndpointInner withCategory(String category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Get the endpoints property: The endpoints that the App Service Environment reaches the service at.
+ *
+ * @return the endpoints value.
+ */
+ public List endpoints() {
+ return this.endpoints;
+ }
+
+ /**
+ * Set the endpoints property: The endpoints that the App Service Environment reaches the service at.
+ *
+ * @param endpoints the endpoints value to set.
+ * @return the OutboundEnvironmentEndpointInner object itself.
+ */
+ public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) {
+ this.endpoints = endpoints;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (endpoints() != null) {
+ endpoints().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/StoragePoolRPOperationInner.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/StoragePoolRPOperationInner.java
new file mode 100644
index 0000000000000..f7cc7240298b3
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/StoragePoolRPOperationInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.models.StoragePoolOperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Description of a StoragePool RP Operation. */
+@Fluent
+public final class StoragePoolRPOperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(StoragePoolRPOperationInner.class);
+
+ /*
+ * The name of the operation being performed on this particular object
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /*
+ * Indicates whether the operation applies to data-plane.
+ */
+ @JsonProperty(value = "isDataAction", required = true)
+ private boolean isDataAction;
+
+ /*
+ * Indicates the action type.
+ */
+ @JsonProperty(value = "actionType")
+ private String actionType;
+
+ /*
+ * Additional metadata about RP operation.
+ */
+ @JsonProperty(value = "display", required = true)
+ private StoragePoolOperationDisplay display;
+
+ /*
+ * The intended executor of the operation; governs the display of the
+ * operation in the RBAC UX and the audit logs UX.
+ */
+ @JsonProperty(value = "origin")
+ private String origin;
+
+ /**
+ * Get the name property: The name of the operation being performed on this particular object.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the operation being performed on this particular object.
+ *
+ * @param name the name value to set.
+ * @return the StoragePoolRPOperationInner object itself.
+ */
+ public StoragePoolRPOperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: Indicates whether the operation applies to data-plane.
+ *
+ * @return the isDataAction value.
+ */
+ public boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation applies to data-plane.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the StoragePoolRPOperationInner object itself.
+ */
+ public StoragePoolRPOperationInner withIsDataAction(boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Get the actionType property: Indicates the action type.
+ *
+ * @return the actionType value.
+ */
+ public String actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Set the actionType property: Indicates the action type.
+ *
+ * @param actionType the actionType value to set.
+ * @return the StoragePoolRPOperationInner object itself.
+ */
+ public StoragePoolRPOperationInner withActionType(String actionType) {
+ this.actionType = actionType;
+ return this;
+ }
+
+ /**
+ * Get the display property: Additional metadata about RP operation.
+ *
+ * @return the display value.
+ */
+ public StoragePoolOperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Additional metadata about RP operation.
+ *
+ * @param display the display value to set.
+ * @return the StoragePoolRPOperationInner object itself.
+ */
+ public StoragePoolRPOperationInner withDisplay(StoragePoolOperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; governs the display of the operation in the RBAC
+ * UX and the audit logs UX.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: The intended executor of the operation; governs the display of the operation in the RBAC
+ * UX and the audit logs UX.
+ *
+ * @param origin the origin value to set.
+ * @return the StoragePoolRPOperationInner object itself.
+ */
+ public StoragePoolRPOperationInner withOrigin(String origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property name in model StoragePoolRPOperationInner"));
+ }
+ if (display() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property display in model StoragePoolRPOperationInner"));
+ } else {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/package-info.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/package-info.java
new file mode 100644
index 0000000000000..fef64fea33699
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/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 StoragePoolManagement. null. */
+package com.azure.resourcemanager.storagepool.fluent.models;
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/package-info.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/package-info.java
new file mode 100644
index 0000000000000..af740edf24db4
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/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 StoragePoolManagement. null. */
+package com.azure.resourcemanager.storagepool.fluent;
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolImpl.java
new file mode 100644
index 0000000000000..29ab635246a60
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolImpl.java
@@ -0,0 +1,276 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolInner;
+import com.azure.resourcemanager.storagepool.models.Disk;
+import com.azure.resourcemanager.storagepool.models.DiskPool;
+import com.azure.resourcemanager.storagepool.models.DiskPoolCreate;
+import com.azure.resourcemanager.storagepool.models.DiskPoolUpdate;
+import com.azure.resourcemanager.storagepool.models.OperationalStatus;
+import com.azure.resourcemanager.storagepool.models.ProvisioningStates;
+import com.azure.resourcemanager.storagepool.models.Sku;
+import com.azure.resourcemanager.storagepool.models.SystemMetadata;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class DiskPoolImpl implements DiskPool, DiskPool.Definition, DiskPool.Update {
+ private DiskPoolInner innerObject;
+
+ private final com.azure.resourcemanager.storagepool.StoragePoolManager 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 SystemMetadata systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ProvisioningStates provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public List availabilityZones() {
+ List inner = this.innerModel().availabilityZones();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public OperationalStatus status() {
+ return this.innerModel().status();
+ }
+
+ public List disks() {
+ List inner = this.innerModel().disks();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String subnetId() {
+ return this.innerModel().subnetId();
+ }
+
+ public List additionalCapabilities() {
+ List inner = this.innerModel().additionalCapabilities();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String nameSkuName() {
+ return this.innerModel().nameSkuName();
+ }
+
+ public String tier() {
+ return this.innerModel().tier();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public DiskPoolInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagepool.StoragePoolManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String diskPoolName;
+
+ private DiskPoolCreate createDiskPoolCreatePayload;
+
+ private DiskPoolUpdate updateDiskPoolUpdatePayload;
+
+ public DiskPoolImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public DiskPool create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDiskPools()
+ .createOrUpdate(resourceGroupName, diskPoolName, createDiskPoolCreatePayload, Context.NONE);
+ return this;
+ }
+
+ public DiskPool create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDiskPools()
+ .createOrUpdate(resourceGroupName, diskPoolName, createDiskPoolCreatePayload, context);
+ return this;
+ }
+
+ DiskPoolImpl(String name, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
+ this.innerObject = new DiskPoolInner();
+ this.serviceManager = serviceManager;
+ this.diskPoolName = name;
+ this.createDiskPoolCreatePayload = new DiskPoolCreate();
+ }
+
+ public DiskPoolImpl update() {
+ this.updateDiskPoolUpdatePayload = new DiskPoolUpdate();
+ return this;
+ }
+
+ public DiskPool apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDiskPools()
+ .update(resourceGroupName, diskPoolName, updateDiskPoolUpdatePayload, Context.NONE);
+ return this;
+ }
+
+ public DiskPool apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDiskPools()
+ .update(resourceGroupName, diskPoolName, updateDiskPoolUpdatePayload, context);
+ return this;
+ }
+
+ DiskPoolImpl(DiskPoolInner innerObject, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.diskPoolName = Utils.getValueFromIdByName(innerObject.id(), "diskPools");
+ }
+
+ public DiskPool refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDiskPools()
+ .getByResourceGroupWithResponse(resourceGroupName, diskPoolName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DiskPool refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDiskPools()
+ .getByResourceGroupWithResponse(resourceGroupName, diskPoolName, context)
+ .getValue();
+ return this;
+ }
+
+ public void start() {
+ serviceManager.diskPools().start(resourceGroupName, diskPoolName);
+ }
+
+ public void start(Context context) {
+ serviceManager.diskPools().start(resourceGroupName, diskPoolName, context);
+ }
+
+ public void deallocate() {
+ serviceManager.diskPools().deallocate(resourceGroupName, diskPoolName);
+ }
+
+ public void deallocate(Context context) {
+ serviceManager.diskPools().deallocate(resourceGroupName, diskPoolName, context);
+ }
+
+ public DiskPoolImpl withRegion(Region location) {
+ this.createDiskPoolCreatePayload.withLocation(location.toString());
+ return this;
+ }
+
+ public DiskPoolImpl withRegion(String location) {
+ this.createDiskPoolCreatePayload.withLocation(location);
+ return this;
+ }
+
+ public DiskPoolImpl withSku(Sku sku) {
+ this.createDiskPoolCreatePayload.withSku(sku);
+ return this;
+ }
+
+ public DiskPoolImpl withSubnetId(String subnetId) {
+ this.createDiskPoolCreatePayload.withSubnetId(subnetId);
+ return this;
+ }
+
+ public DiskPoolImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.createDiskPoolCreatePayload.withTags(tags);
+ return this;
+ } else {
+ this.updateDiskPoolUpdatePayload.withTags(tags);
+ return this;
+ }
+ }
+
+ public DiskPoolImpl withAvailabilityZones(List availabilityZones) {
+ this.createDiskPoolCreatePayload.withAvailabilityZones(availabilityZones);
+ return this;
+ }
+
+ public DiskPoolImpl withDisks(List disks) {
+ if (isInCreateMode()) {
+ this.createDiskPoolCreatePayload.withDisks(disks);
+ return this;
+ } else {
+ this.updateDiskPoolUpdatePayload.withDisks(disks);
+ return this;
+ }
+ }
+
+ public DiskPoolImpl withAdditionalCapabilities(List additionalCapabilities) {
+ this.createDiskPoolCreatePayload.withAdditionalCapabilities(additionalCapabilities);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZoneInfoImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZoneInfoImpl.java
new file mode 100644
index 0000000000000..f2450215106e5
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZoneInfoImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.implementation;
+
+import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolZoneInfoInner;
+import com.azure.resourcemanager.storagepool.models.DiskPoolZoneInfo;
+import com.azure.resourcemanager.storagepool.models.Sku;
+import java.util.Collections;
+import java.util.List;
+
+public final class DiskPoolZoneInfoImpl implements DiskPoolZoneInfo {
+ private DiskPoolZoneInfoInner innerObject;
+
+ private final com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager;
+
+ DiskPoolZoneInfoImpl(
+ DiskPoolZoneInfoInner innerObject, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List availabilityZones() {
+ List inner = this.innerModel().availabilityZones();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List additionalCapabilities() {
+ List inner = this.innerModel().additionalCapabilities();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Sku sku() {
+ return this.innerModel().sku();
+ }
+
+ public DiskPoolZoneInfoInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagepool.StoragePoolManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZonesClientImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZonesClientImpl.java
new file mode 100644
index 0000000000000..d38bbc1dad51f
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZonesClientImpl.java
@@ -0,0 +1,312 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.fluent.DiskPoolZonesClient;
+import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolZoneInfoInner;
+import com.azure.resourcemanager.storagepool.models.DiskPoolZoneListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in DiskPoolZonesClient. */
+public final class DiskPoolZonesClientImpl implements DiskPoolZonesClient {
+ private final ClientLogger logger = new ClientLogger(DiskPoolZonesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DiskPoolZonesService service;
+
+ /** The service client containing this operation class. */
+ private final StoragePoolManagementImpl client;
+
+ /**
+ * Initializes an instance of DiskPoolZonesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DiskPoolZonesClientImpl(StoragePoolManagementImpl client) {
+ this.service =
+ RestProxy.create(DiskPoolZonesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StoragePoolManagementDiskPoolZones to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StoragePoolManagemen")
+ private interface DiskPoolZonesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StoragePool/locations/{location}/diskPoolZones")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("location") String location,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String location) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ location,
+ 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 available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String location, 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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(),
+ location,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String location) {
+ return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String location, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String location) {
+ return new PagedIterable<>(listAsync(location));
+ }
+
+ /**
+ * Lists available Disk Pool Skus in an Azure location.
+ *
+ * @param location The location of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String location, Context context) {
+ return new PagedIterable<>(listAsync(location, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Disk Pool skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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
+ .listNext(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/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZonesImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZonesImpl.java
new file mode 100644
index 0000000000000..c17c1e48a53b7
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolZonesImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagepool.fluent.DiskPoolZonesClient;
+import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolZoneInfoInner;
+import com.azure.resourcemanager.storagepool.models.DiskPoolZoneInfo;
+import com.azure.resourcemanager.storagepool.models.DiskPoolZones;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class DiskPoolZonesImpl implements DiskPoolZones {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolZonesImpl.class);
+
+ private final DiskPoolZonesClient innerClient;
+
+ private final com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager;
+
+ public DiskPoolZonesImpl(
+ DiskPoolZonesClient innerClient, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String location) {
+ PagedIterable inner = this.serviceClient().list(location);
+ return Utils.mapPage(inner, inner1 -> new DiskPoolZoneInfoImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String location, Context context) {
+ PagedIterable inner = this.serviceClient().list(location, context);
+ return Utils.mapPage(inner, inner1 -> new DiskPoolZoneInfoImpl(inner1, this.manager()));
+ }
+
+ private DiskPoolZonesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.storagepool.StoragePoolManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolsClientImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolsClientImpl.java
new file mode 100644
index 0000000000000..4e6a907aaa88e
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolsClientImpl.java
@@ -0,0 +1,2318 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.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.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagepool.fluent.DiskPoolsClient;
+import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolInner;
+import com.azure.resourcemanager.storagepool.fluent.models.OutboundEnvironmentEndpointInner;
+import com.azure.resourcemanager.storagepool.models.DiskPoolCreate;
+import com.azure.resourcemanager.storagepool.models.DiskPoolListResult;
+import com.azure.resourcemanager.storagepool.models.DiskPoolUpdate;
+import com.azure.resourcemanager.storagepool.models.OutboundEnvironmentEndpointList;
+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 DiskPoolsClient. */
+public final class DiskPoolsClientImpl implements DiskPoolsClient {
+ private final ClientLogger logger = new ClientLogger(DiskPoolsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DiskPoolsService service;
+
+ /** The service client containing this operation class. */
+ private final StoragePoolManagementImpl client;
+
+ /**
+ * Initializes an instance of DiskPoolsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DiskPoolsClientImpl(StoragePoolManagementImpl client) {
+ this.service =
+ RestProxy.create(DiskPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StoragePoolManagementDiskPools to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StoragePoolManagemen")
+ private interface DiskPoolsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StoragePool/diskPools")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DiskPoolCreate diskPoolCreatePayload,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DiskPoolUpdate diskPoolUpdatePayload,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/outboundNetworkDependenciesEndpoints")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listOutboundNetworkDependenciesEndpoints(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/start")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> start(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/deallocate")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> deallocate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @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> listOutboundNetworkDependenciesEndpointsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @throws 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 Disk Pools in a subscription.
+ */
+ @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.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Disk Pools in a subscription.
+ */
+ @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.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @throws 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 Disk Pools in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Disk Pools in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @throws 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 Disk Pools in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets a list of Disk Pools in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Disk Pools in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @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.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @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.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Gets a list of DiskPools in a 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 a list of DiskPools in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (diskPoolCreatePayload == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter diskPoolCreatePayload is required and cannot be null."));
+ } else {
+ diskPoolCreatePayload.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ diskPoolCreatePayload,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (diskPoolCreatePayload == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter diskPoolCreatePayload is required and cannot be null."));
+ } else {
+ diskPoolCreatePayload.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ diskPoolCreatePayload,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DiskPoolInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DiskPoolInner.class, DiskPoolInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DiskPoolInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DiskPoolInner.class, DiskPoolInner.class, context);
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DiskPoolInner> beginCreateOrUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload) {
+ return beginCreateOrUpdateAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload).getSyncPoller();
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DiskPoolInner> beginCreateOrUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload) {
+ return beginCreateOrUpdateAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskPoolInner createOrUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload) {
+ return createOrUpdateAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload).block();
+ }
+
+ /**
+ * Create or Update Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolCreatePayload Request payload for Disk Pool create operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskPoolInner createOrUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolCreate diskPoolCreatePayload, Context context) {
+ return createOrUpdateAsync(resourceGroupName, diskPoolName, diskPoolCreatePayload, context).block();
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (diskPoolUpdatePayload == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter diskPoolUpdatePayload is required and cannot be null."));
+ } else {
+ diskPoolUpdatePayload.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ diskPoolUpdatePayload,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (diskPoolUpdatePayload == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter diskPoolUpdatePayload is required and cannot be null."));
+ } else {
+ diskPoolUpdatePayload.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ diskPoolUpdatePayload,
+ accept,
+ context);
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DiskPoolInner> beginUpdateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DiskPoolInner.class, DiskPoolInner.class, Context.NONE);
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DiskPoolInner> beginUpdateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DiskPoolInner.class, DiskPoolInner.class, context);
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DiskPoolInner> beginUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload) {
+ return beginUpdateAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload).getSyncPoller();
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DiskPoolInner> beginUpdate(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload, Context context) {
+ return beginUpdateAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload, context).getSyncPoller();
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload) {
+ return beginUpdateAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload, Context context) {
+ return beginUpdateAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update 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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskPoolInner update(String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload) {
+ return updateAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload).block();
+ }
+
+ /**
+ * Update a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param diskPoolUpdatePayload Request payload for Disk Pool update operation.
+ * @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 for Disk Pool request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskPoolInner update(
+ String resourceGroupName, String diskPoolName, DiskPoolUpdate diskPoolUpdatePayload, Context context) {
+ return updateAsync(resourceGroupName, diskPoolName, diskPoolUpdatePayload, context).block();
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String diskPoolName) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String diskPoolName, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String diskPoolName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, diskPoolName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String diskPoolName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, diskPoolName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String diskPoolName) {
+ return beginDeleteAsync(resourceGroupName, diskPoolName).getSyncPoller();
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return beginDeleteAsync(resourceGroupName, diskPoolName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String diskPoolName) {
+ return beginDeleteAsync(resourceGroupName, diskPoolName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String diskPoolName, Context context) {
+ return beginDeleteAsync(resourceGroupName, diskPoolName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String diskPoolName) {
+ deleteAsync(resourceGroupName, diskPoolName).block();
+ }
+
+ /**
+ * Delete a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String diskPoolName, Context context) {
+ deleteAsync(resourceGroupName, diskPoolName, context).block();
+ }
+
+ /**
+ * Get a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String diskPoolName) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String diskPoolName, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String diskPoolName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, diskPoolName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskPoolInner getByResourceGroup(String resourceGroupName, String diskPoolName) {
+ return getByResourceGroupAsync(resourceGroupName, diskPoolName).block();
+ }
+
+ /**
+ * Get a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, diskPoolName, context).block();
+ }
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String diskPoolName) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listOutboundNetworkDependenciesEndpoints(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsSinglePageAsync(
+ String resourceGroupName, String diskPoolName, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listOutboundNetworkDependenciesEndpoints(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listOutboundNetworkDependenciesEndpointsAsync(
+ String resourceGroupName, String diskPoolName) {
+ return new PagedFlux<>(
+ () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, diskPoolName),
+ nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listOutboundNetworkDependenciesEndpointsAsync(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return new PagedFlux<>(
+ () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, diskPoolName, context),
+ nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listOutboundNetworkDependenciesEndpoints(
+ String resourceGroupName, String diskPoolName) {
+ return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, diskPoolName));
+ }
+
+ /**
+ * Gets the network endpoints of all outbound dependencies of a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the network endpoints of all outbound dependencies of a Disk Pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listOutboundNetworkDependenciesEndpoints(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return new PagedIterable<>(
+ listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, diskPoolName, context));
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> startWithResponseAsync(String resourceGroupName, String diskPoolName) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> startWithResponseAsync(
+ String resourceGroupName, String diskPoolName, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginStartAsync(String resourceGroupName, String diskPoolName) {
+ Mono>> mono = startWithResponseAsync(resourceGroupName, diskPoolName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginStartAsync(
+ String resourceGroupName, String diskPoolName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = startWithResponseAsync(resourceGroupName, diskPoolName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginStart(String resourceGroupName, String diskPoolName) {
+ return beginStartAsync(resourceGroupName, diskPoolName).getSyncPoller();
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginStart(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return beginStartAsync(resourceGroupName, diskPoolName, context).getSyncPoller();
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono startAsync(String resourceGroupName, String diskPoolName) {
+ return beginStartAsync(resourceGroupName, diskPoolName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono startAsync(String resourceGroupName, String diskPoolName, Context context) {
+ return beginStartAsync(resourceGroupName, diskPoolName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void start(String resourceGroupName, String diskPoolName) {
+ startAsync(resourceGroupName, diskPoolName).block();
+ }
+
+ /**
+ * The operation to start a Disk Pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void start(String resourceGroupName, String diskPoolName, Context context) {
+ startAsync(resourceGroupName, diskPoolName, context).block();
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deallocateWithResponseAsync(
+ String resourceGroupName, String diskPoolName) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .deallocate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deallocateWithResponseAsync(
+ String resourceGroupName, String diskPoolName, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .deallocate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeallocateAsync(String resourceGroupName, String diskPoolName) {
+ Mono>> mono = deallocateWithResponseAsync(resourceGroupName, diskPoolName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeallocateAsync(
+ String resourceGroupName, String diskPoolName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deallocateWithResponseAsync(resourceGroupName, diskPoolName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDeallocate(String resourceGroupName, String diskPoolName) {
+ return beginDeallocateAsync(resourceGroupName, diskPoolName).getSyncPoller();
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDeallocate(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return beginDeallocateAsync(resourceGroupName, diskPoolName, context).getSyncPoller();
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deallocateAsync(String resourceGroupName, String diskPoolName) {
+ return beginDeallocateAsync(resourceGroupName, diskPoolName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deallocateAsync(String resourceGroupName, String diskPoolName, Context context) {
+ return beginDeallocateAsync(resourceGroupName, diskPoolName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deallocate(String resourceGroupName, String diskPoolName) {
+ deallocateAsync(resourceGroupName, diskPoolName).block();
+ }
+
+ /**
+ * Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute resources that
+ * this Disk Pool uses.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deallocate(String resourceGroupName, String diskPoolName, Context context) {
+ deallocateAsync(resourceGroupName, diskPoolName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Disk Pools.
+ */
+ @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 nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Disk Pools.
+ */
+ @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 nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Disk Pools.
+ */
+ @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 nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Disk Pools.
+ */
+ @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 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 collection of Outbound Environment Endpoints.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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
+ .listOutboundNetworkDependenciesEndpointsNext(
+ 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 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 collection of Outbound Environment Endpoints.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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
+ .listOutboundNetworkDependenciesEndpointsNext(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/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolsImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolsImpl.java
new file mode 100644
index 0000000000000..31895fb9e93f2
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/DiskPoolsImpl.java
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.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.storagepool.fluent.DiskPoolsClient;
+import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolInner;
+import com.azure.resourcemanager.storagepool.fluent.models.OutboundEnvironmentEndpointInner;
+import com.azure.resourcemanager.storagepool.models.DiskPool;
+import com.azure.resourcemanager.storagepool.models.DiskPools;
+import com.azure.resourcemanager.storagepool.models.OutboundEnvironmentEndpoint;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class DiskPoolsImpl implements DiskPools {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolsImpl.class);
+
+ private final DiskPoolsClient innerClient;
+
+ private final com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager;
+
+ public DiskPoolsImpl(
+ DiskPoolsClient innerClient, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new DiskPoolImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new DiskPoolImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new DiskPoolImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new DiskPoolImpl(inner1, this.manager()));
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String diskPoolName) {
+ this.serviceClient().delete(resourceGroupName, diskPoolName);
+ }
+
+ public void delete(String resourceGroupName, String diskPoolName, Context context) {
+ this.serviceClient().delete(resourceGroupName, diskPoolName, context);
+ }
+
+ public DiskPool getByResourceGroup(String resourceGroupName, String diskPoolName) {
+ DiskPoolInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, diskPoolName);
+ if (inner != null) {
+ return new DiskPoolImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String diskPoolName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, diskPoolName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DiskPoolImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listOutboundNetworkDependenciesEndpoints(
+ String resourceGroupName, String diskPoolName) {
+ PagedIterable inner =
+ this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, diskPoolName);
+ return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listOutboundNetworkDependenciesEndpoints(
+ String resourceGroupName, String diskPoolName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, diskPoolName, context);
+ return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
+ }
+
+ public void start(String resourceGroupName, String diskPoolName) {
+ this.serviceClient().start(resourceGroupName, diskPoolName);
+ }
+
+ public void start(String resourceGroupName, String diskPoolName, Context context) {
+ this.serviceClient().start(resourceGroupName, diskPoolName, context);
+ }
+
+ public void deallocate(String resourceGroupName, String diskPoolName) {
+ this.serviceClient().deallocate(resourceGroupName, diskPoolName);
+ }
+
+ public void deallocate(String resourceGroupName, String diskPoolName, Context context) {
+ this.serviceClient().deallocate(resourceGroupName, diskPoolName, context);
+ }
+
+ public DiskPool getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String diskPoolName = Utils.getValueFromIdByName(id, "diskPools");
+ if (diskPoolName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, diskPoolName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String diskPoolName = Utils.getValueFromIdByName(id, "diskPools");
+ if (diskPoolName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, diskPoolName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String diskPoolName = Utils.getValueFromIdByName(id, "diskPools");
+ if (diskPoolName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id)));
+ }
+ this.delete(resourceGroupName, diskPoolName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String diskPoolName = Utils.getValueFromIdByName(id, "diskPools");
+ if (diskPoolName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id)));
+ }
+ this.delete(resourceGroupName, diskPoolName, context);
+ }
+
+ private DiskPoolsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.storagepool.StoragePoolManager manager() {
+ return this.serviceManager;
+ }
+
+ public DiskPoolImpl define(String name) {
+ return new DiskPoolImpl(name, this.manager());
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetImpl.java
new file mode 100644
index 0000000000000..2598428a40601
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetImpl.java
@@ -0,0 +1,225 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetInner;
+import com.azure.resourcemanager.storagepool.models.Acl;
+import com.azure.resourcemanager.storagepool.models.IscsiLun;
+import com.azure.resourcemanager.storagepool.models.IscsiTarget;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetAclMode;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetCreate;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetUpdate;
+import com.azure.resourcemanager.storagepool.models.OperationalStatus;
+import com.azure.resourcemanager.storagepool.models.ProvisioningStates;
+import com.azure.resourcemanager.storagepool.models.SystemMetadata;
+import java.util.Collections;
+import java.util.List;
+
+public final class IscsiTargetImpl implements IscsiTarget, IscsiTarget.Definition, IscsiTarget.Update {
+ private IscsiTargetInner innerObject;
+
+ private final com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemMetadata systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public IscsiTargetAclMode aclMode() {
+ return this.innerModel().aclMode();
+ }
+
+ public List staticAcls() {
+ List inner = this.innerModel().staticAcls();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List luns() {
+ List inner = this.innerModel().luns();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String targetIqn() {
+ return this.innerModel().targetIqn();
+ }
+
+ public ProvisioningStates provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public OperationalStatus status() {
+ return this.innerModel().status();
+ }
+
+ public List endpoints() {
+ List inner = this.innerModel().endpoints();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Integer port() {
+ return this.innerModel().port();
+ }
+
+ public IscsiTargetInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagepool.StoragePoolManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String diskPoolName;
+
+ private String iscsiTargetName;
+
+ private IscsiTargetCreate createIscsiTargetCreatePayload;
+
+ private IscsiTargetUpdate updateIscsiTargetUpdatePayload;
+
+ public IscsiTargetImpl withExistingDiskPool(String resourceGroupName, String diskPoolName) {
+ this.resourceGroupName = resourceGroupName;
+ this.diskPoolName = diskPoolName;
+ return this;
+ }
+
+ public IscsiTarget create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIscsiTargets()
+ .createOrUpdate(
+ resourceGroupName, diskPoolName, iscsiTargetName, createIscsiTargetCreatePayload, Context.NONE);
+ return this;
+ }
+
+ public IscsiTarget create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIscsiTargets()
+ .createOrUpdate(
+ resourceGroupName, diskPoolName, iscsiTargetName, createIscsiTargetCreatePayload, context);
+ return this;
+ }
+
+ IscsiTargetImpl(String name, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
+ this.innerObject = new IscsiTargetInner();
+ this.serviceManager = serviceManager;
+ this.iscsiTargetName = name;
+ this.createIscsiTargetCreatePayload = new IscsiTargetCreate();
+ }
+
+ public IscsiTargetImpl update() {
+ this.updateIscsiTargetUpdatePayload = new IscsiTargetUpdate();
+ return this;
+ }
+
+ public IscsiTarget apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIscsiTargets()
+ .update(resourceGroupName, diskPoolName, iscsiTargetName, updateIscsiTargetUpdatePayload, Context.NONE);
+ return this;
+ }
+
+ public IscsiTarget apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIscsiTargets()
+ .update(resourceGroupName, diskPoolName, iscsiTargetName, updateIscsiTargetUpdatePayload, context);
+ return this;
+ }
+
+ IscsiTargetImpl(
+ IscsiTargetInner innerObject, com.azure.resourcemanager.storagepool.StoragePoolManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.diskPoolName = Utils.getValueFromIdByName(innerObject.id(), "diskPools");
+ this.iscsiTargetName = Utils.getValueFromIdByName(innerObject.id(), "iscsiTargets");
+ }
+
+ public IscsiTarget refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIscsiTargets()
+ .getWithResponse(resourceGroupName, diskPoolName, iscsiTargetName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public IscsiTarget refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIscsiTargets()
+ .getWithResponse(resourceGroupName, diskPoolName, iscsiTargetName, context)
+ .getValue();
+ return this;
+ }
+
+ public IscsiTargetImpl withAclMode(IscsiTargetAclMode aclMode) {
+ this.createIscsiTargetCreatePayload.withAclMode(aclMode);
+ return this;
+ }
+
+ public IscsiTargetImpl withTargetIqn(String targetIqn) {
+ this.createIscsiTargetCreatePayload.withTargetIqn(targetIqn);
+ return this;
+ }
+
+ public IscsiTargetImpl withStaticAcls(List staticAcls) {
+ if (isInCreateMode()) {
+ this.createIscsiTargetCreatePayload.withStaticAcls(staticAcls);
+ return this;
+ } else {
+ this.updateIscsiTargetUpdatePayload.withStaticAcls(staticAcls);
+ return this;
+ }
+ }
+
+ public IscsiTargetImpl withLuns(List luns) {
+ if (isInCreateMode()) {
+ this.createIscsiTargetCreatePayload.withLuns(luns);
+ return this;
+ } else {
+ this.updateIscsiTargetUpdatePayload.withLuns(luns);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetsClientImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetsClientImpl.java
new file mode 100644
index 0000000000000..c19621693d3bc
--- /dev/null
+++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetsClientImpl.java
@@ -0,0 +1,1486 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagepool.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagepool.fluent.IscsiTargetsClient;
+import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetInner;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetCreate;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetList;
+import com.azure.resourcemanager.storagepool.models.IscsiTargetUpdate;
+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 IscsiTargetsClient. */
+public final class IscsiTargetsClientImpl implements IscsiTargetsClient {
+ private final ClientLogger logger = new ClientLogger(IscsiTargetsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final IscsiTargetsService service;
+
+ /** The service client containing this operation class. */
+ private final StoragePoolManagementImpl client;
+
+ /**
+ * Initializes an instance of IscsiTargetsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ IscsiTargetsClientImpl(StoragePoolManagementImpl client) {
+ this.service =
+ RestProxy.create(IscsiTargetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StoragePoolManagementIscsiTargets to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StoragePoolManagemen")
+ private interface IscsiTargetsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/iscsiTargets")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByDiskPool(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @PathParam("iscsiTargetName") String iscsiTargetName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") IscsiTargetCreate iscsiTargetCreatePayload,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @PathParam("iscsiTargetName") String iscsiTargetName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") IscsiTargetUpdate iscsiTargetUpdatePayload,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @PathParam("iscsiTargetName") String iscsiTargetName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool"
+ + "/diskPools/{diskPoolName}/iscsiTargets/{iscsiTargetName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("diskPoolName") String diskPoolName,
+ @PathParam("iscsiTargetName") String iscsiTargetName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByDiskPoolNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDiskPoolSinglePageAsync(
+ String resourceGroupName, String diskPoolName) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByDiskPool(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByDiskPoolSinglePageAsync(
+ String resourceGroupName, String diskPoolName, 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByDiskPool(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDiskPoolAsync(String resourceGroupName, String diskPoolName) {
+ return new PagedFlux<>(
+ () -> listByDiskPoolSinglePageAsync(resourceGroupName, diskPoolName),
+ nextLink -> listByDiskPoolNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByDiskPoolAsync(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return new PagedFlux<>(
+ () -> listByDiskPoolSinglePageAsync(resourceGroupName, diskPoolName, context),
+ nextLink -> listByDiskPoolNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName) {
+ return new PagedIterable<>(listByDiskPoolAsync(resourceGroupName, diskPoolName));
+ }
+
+ /**
+ * Get iSCSI Targets in a Disk pool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return iSCSI Targets in a Disk pool.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByDiskPool(
+ String resourceGroupName, String diskPoolName, Context context) {
+ return new PagedIterable<>(listByDiskPoolAsync(resourceGroupName, diskPoolName, context));
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (iscsiTargetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter iscsiTargetName is required and cannot be null."));
+ }
+ if (iscsiTargetCreatePayload == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter iscsiTargetCreatePayload is required and cannot be null."));
+ } else {
+ iscsiTargetCreatePayload.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ iscsiTargetName,
+ this.client.getApiVersion(),
+ iscsiTargetCreatePayload,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload,
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (iscsiTargetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter iscsiTargetName is required and cannot be null."));
+ }
+ if (iscsiTargetCreatePayload == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter iscsiTargetCreatePayload is required and cannot be null."));
+ } else {
+ iscsiTargetCreatePayload.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ iscsiTargetName,
+ this.client.getApiVersion(),
+ iscsiTargetCreatePayload,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, IscsiTargetInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), IscsiTargetInner.class, IscsiTargetInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, IscsiTargetInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), IscsiTargetInner.class, IscsiTargetInner.class, context);
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, IscsiTargetInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload) {
+ return beginCreateOrUpdateAsync(resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, IscsiTargetInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload,
+ Context context) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload) {
+ return beginCreateOrUpdateAsync(resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload,
+ Context context) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public IscsiTargetInner createOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload) {
+ return createOrUpdateAsync(resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload).block();
+ }
+
+ /**
+ * Create or Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetCreatePayload Request payload for iSCSI Target create operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public IscsiTargetInner createOrUpdate(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetCreate iscsiTargetCreatePayload,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetCreatePayload, context)
+ .block();
+ }
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload) {
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (iscsiTargetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter iscsiTargetName is required and cannot be null."));
+ }
+ if (iscsiTargetUpdatePayload == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter iscsiTargetUpdatePayload is required and cannot be null."));
+ } else {
+ iscsiTargetUpdatePayload.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ iscsiTargetName,
+ this.client.getApiVersion(),
+ iscsiTargetUpdatePayload,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload,
+ 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 (diskPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter diskPoolName is required and cannot be null."));
+ }
+ if (iscsiTargetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter iscsiTargetName is required and cannot be null."));
+ }
+ if (iscsiTargetUpdatePayload == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter iscsiTargetUpdatePayload is required and cannot be null."));
+ } else {
+ iscsiTargetUpdatePayload.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ diskPoolName,
+ iscsiTargetName,
+ this.client.getApiVersion(),
+ iscsiTargetUpdatePayload,
+ accept,
+ context);
+ }
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update 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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, IscsiTargetInner> beginUpdateAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload) {
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, diskPoolName, iscsiTargetName, iscsiTargetUpdatePayload);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), IscsiTargetInner.class, IscsiTargetInner.class, Context.NONE);
+ }
+
+ /**
+ * Update an iSCSI Target.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param diskPoolName The name of the Disk Pool.
+ * @param iscsiTargetName The name of the iSCSI Target.
+ * @param iscsiTargetUpdatePayload Request payload for iSCSI Target update operation.
+ * @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 for iSCSI Target requests.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, IscsiTargetInner> beginUpdateAsync(
+ String resourceGroupName,
+ String diskPoolName,
+ String iscsiTargetName,
+ IscsiTargetUpdate iscsiTargetUpdatePayload,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono