From 34f03d1a77faefd942833f2f6ca76c7827af63da Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 13 May 2022 03:51:00 +0000 Subject: [PATCH] CodeGen from PR 18996 in Azure/azure-rest-api-specs Migrate to net track2 for some resource-manager readmes (#18996) * migrate to net track2 for some mgmt RPs * Update readme.md --- .../CHANGELOG.md | 4 +- .../README.md | 2 +- .../storagepool/StoragePoolManager.java | 91 ++++++++- .../fluent/DiskPoolZonesClient.java | 4 +- .../storagepool/fluent/DiskPoolsClient.java | 40 ++-- .../fluent/IscsiTargetsClient.java | 18 +- .../storagepool/fluent/OperationsClient.java | 4 +- .../fluent/ResourceSkusClient.java | 4 +- .../models/DiskPoolCreateProperties.java | 7 +- .../fluent/models/DiskPoolInner.java | 7 +- .../fluent/models/DiskPoolProperties.java | 11 +- .../models/DiskPoolUpdateProperties.java | 4 - .../fluent/models/DiskPoolZoneInfoInner.java | 4 - .../models/IscsiTargetCreateProperties.java | 7 +- .../fluent/models/IscsiTargetInner.java | 7 +- .../fluent/models/IscsiTargetProperties.java | 11 +- .../models/IscsiTargetUpdateProperties.java | 4 - .../OutboundEnvironmentEndpointInner.java | 4 - .../fluent/models/ResourceSkuInfoInner.java | 4 - .../storagepool/fluent/models/Sku.java | 7 +- .../models/StoragePoolRPOperationInner.java | 9 +- .../DiskPoolZonesClientImpl.java | 23 ++- .../implementation/DiskPoolZonesImpl.java | 3 +- .../implementation/DiskPoolsClientImpl.java | 191 ++++++++++-------- .../implementation/DiskPoolsImpl.java | 19 +- .../IscsiTargetsClientImpl.java | 90 +++++---- .../implementation/IscsiTargetsImpl.java | 27 ++- .../implementation/OperationsClientImpl.java | 17 +- .../implementation/OperationsImpl.java | 3 +- .../ResourceSkusClientImpl.java | 23 ++- .../implementation/ResourceSkusImpl.java | 3 +- .../StoragePoolManagementBuilder.java | 34 ++-- .../StoragePoolManagementImpl.java | 6 +- .../storagepool/models/Acl.java | 9 +- .../storagepool/models/CreatedByType.java | 6 +- .../storagepool/models/Disk.java | 7 +- .../storagepool/models/DiskPoolCreate.java | 9 +- .../models/DiskPoolListResult.java | 7 +- .../storagepool/models/DiskPoolUpdate.java | 7 +- .../models/DiskPoolZoneListResult.java | 4 - .../storagepool/models/DiskPoolZones.java | 4 +- .../storagepool/models/DiskPools.java | 20 +- .../models/EndpointDependency.java | 4 - .../storagepool/models/EndpointDetail.java | 4 - .../storagepool/models/IscsiLun.java | 9 +- .../models/IscsiTargetAclMode.java | 6 +- .../storagepool/models/IscsiTargetCreate.java | 7 +- .../storagepool/models/IscsiTargetList.java | 7 +- .../storagepool/models/IscsiTargetUpdate.java | 7 +- .../storagepool/models/IscsiTargets.java | 10 +- .../storagepool/models/OperationalStatus.java | 6 +- .../storagepool/models/Operations.java | 4 +- .../OutboundEnvironmentEndpointList.java | 7 +- .../models/ProvisioningStates.java | 6 +- .../models/ResourceSkuCapability.java | 4 - .../models/ResourceSkuListResult.java | 4 - .../models/ResourceSkuLocationInfo.java | 4 - .../models/ResourceSkuRestrictionInfo.java | 4 - .../models/ResourceSkuRestrictions.java | 4 - .../models/ResourceSkuZoneDetails.java | 4 - .../storagepool/models/ResourceSkus.java | 4 +- .../models/StoragePoolOperationDisplay.java | 13 +- .../StoragePoolOperationListResult.java | 7 +- .../storagepool/models/SystemMetadata.java | 4 - 64 files changed, 463 insertions(+), 431 deletions(-) diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/CHANGELOG.md b/sdk/storagepool/azure-resourcemanager-storagepool/CHANGELOG.md index 0e809f384505..b87dc4dbc6d3 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/CHANGELOG.md +++ b/sdk/storagepool/azure-resourcemanager-storagepool/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-05-13) + +- Azure Resource Manager StoragePool client library for Java. This package contains Microsoft Azure SDK for StoragePool Management SDK. Package tag package-2021-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/README.md b/sdk/storagepool/azure-resourcemanager-storagepool/README.md index ad38a4014f39..afafc9f7b3d3 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/README.md +++ b/sdk/storagepool/azure-resourcemanager-storagepool/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-storagepool - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) 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 index 688d1c5bcc7d..deb4cd2c29d6 100644 --- 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 @@ -8,12 +8,15 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; 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.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -37,6 +40,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to StoragePoolManager. */ public final class StoragePoolManager { @@ -77,6 +81,19 @@ public static StoragePoolManager authenticate(TokenCredential credential, AzureP return configure().authenticate(credential, profile); } + /** + * Creates an instance of StoragePool service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the StoragePool service API instance. + */ + public static StoragePoolManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new StoragePoolManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create StoragePoolManager with optional configuration. * @@ -88,13 +105,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static 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 RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -155,6 +173,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -162,9 +193,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -204,16 +237,34 @@ public StoragePoolManager authenticate(TokenCredential credential, AzureProfile scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -225,7 +276,11 @@ public StoragePoolManager authenticate(TokenCredential credential, AzureProfile } } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -233,7 +288,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of DiskPools. */ + /** + * Gets the resource collection API of DiskPools. + * + * @return Resource collection API of DiskPools. + */ public DiskPools diskPools() { if (this.diskPools == null) { this.diskPools = new DiskPoolsImpl(clientObject.getDiskPools(), this); @@ -241,7 +300,11 @@ public DiskPools diskPools() { return diskPools; } - /** @return Resource collection API of DiskPoolZones. */ + /** + * Gets the resource collection API of DiskPoolZones. + * + * @return Resource collection API of DiskPoolZones. + */ public DiskPoolZones diskPoolZones() { if (this.diskPoolZones == null) { this.diskPoolZones = new DiskPoolZonesImpl(clientObject.getDiskPoolZones(), this); @@ -249,7 +312,11 @@ public DiskPoolZones diskPoolZones() { return diskPoolZones; } - /** @return Resource collection API of ResourceSkus. */ + /** + * Gets the resource collection API of ResourceSkus. + * + * @return Resource collection API of ResourceSkus. + */ public ResourceSkus resourceSkus() { if (this.resourceSkus == null) { this.resourceSkus = new ResourceSkusImpl(clientObject.getResourceSkus(), this); @@ -257,7 +324,11 @@ public ResourceSkus resourceSkus() { return resourceSkus; } - /** @return Resource collection API of IscsiTargets. */ + /** + * Gets the resource collection API of IscsiTargets. + * + * @return Resource collection API of IscsiTargets. + */ public IscsiTargets iscsiTargets() { if (this.iscsiTargets == null) { this.iscsiTargets = new IscsiTargetsImpl(clientObject.getIscsiTargets(), this); 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 index d0f1218ac434..94f51e54c5c7 100644 --- 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 @@ -19,7 +19,7 @@ public interface DiskPoolZonesClient { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location); @@ -32,7 +32,7 @@ public interface DiskPoolZonesClient { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @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 index b4a7f766e0ec..9ef8594a6531 100644 --- 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 @@ -23,7 +23,7 @@ public interface DiskPoolsClient { * * @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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -35,7 +35,7 @@ public interface DiskPoolsClient { * @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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -47,7 +47,7 @@ public interface DiskPoolsClient { * @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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -60,7 +60,7 @@ public interface DiskPoolsClient { * @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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -75,7 +75,7 @@ public interface DiskPoolsClient { * @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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiskPoolInner> beginCreateOrUpdate( @@ -92,7 +92,7 @@ SyncPoller, DiskPoolInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiskPoolInner> beginCreateOrUpdate( @@ -139,7 +139,7 @@ DiskPoolInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiskPoolInner> beginUpdate( @@ -155,7 +155,7 @@ SyncPoller, DiskPoolInner> beginUpdate( * @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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiskPoolInner> beginUpdate( @@ -200,7 +200,7 @@ DiskPoolInner update( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String diskPoolName); @@ -215,7 +215,7 @@ DiskPoolInner update( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String diskPoolName, Context context); @@ -269,7 +269,7 @@ DiskPoolInner update( * @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. + * @return a Disk pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -283,7 +283,8 @@ Response getByResourceGroupWithResponse( * @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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listOutboundNetworkDependenciesEndpoints( @@ -298,7 +299,8 @@ PagedIterable listOutboundNetworkDependenciesE * @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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listOutboundNetworkDependenciesEndpoints( @@ -313,7 +315,7 @@ PagedIterable listOutboundNetworkDependenciesE * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String diskPoolName); @@ -328,7 +330,7 @@ PagedIterable listOutboundNetworkDependenciesE * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String diskPoolName, Context context); @@ -369,7 +371,7 @@ PagedIterable listOutboundNetworkDependenciesE * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeallocate(String resourceGroupName, String diskPoolName); @@ -384,7 +386,7 @@ PagedIterable listOutboundNetworkDependenciesE * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeallocate(String resourceGroupName, String diskPoolName, Context context); @@ -425,7 +427,7 @@ PagedIterable listOutboundNetworkDependenciesE * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginUpgrade(String resourceGroupName, String diskPoolName); @@ -440,7 +442,7 @@ PagedIterable listOutboundNetworkDependenciesE * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginUpgrade(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 index cdb64475350c..a65251741f14 100644 --- 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 @@ -25,7 +25,7 @@ public interface IscsiTargetsClient { * @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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName); @@ -39,7 +39,7 @@ public interface IscsiTargetsClient { * @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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName, Context context); @@ -54,7 +54,7 @@ public interface IscsiTargetsClient { * @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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiTargetInner> beginCreateOrUpdate( @@ -74,7 +74,7 @@ SyncPoller, IscsiTargetInner> beginCreateOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiTargetInner> beginCreateOrUpdate( @@ -134,7 +134,7 @@ IscsiTargetInner createOrUpdate( * @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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiTargetInner> beginUpdate( @@ -154,7 +154,7 @@ SyncPoller, IscsiTargetInner> beginUpdate( * @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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiTargetInner> beginUpdate( @@ -213,7 +213,7 @@ IscsiTargetInner update( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -229,7 +229,7 @@ SyncPoller, Void> beginDelete( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -286,7 +286,7 @@ SyncPoller, Void> beginDelete( * @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. + * @return an iSCSI Target along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( 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 index 9a803ae5ad68..7265d8a6cd4f 100644 --- 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 @@ -17,7 +17,7 @@ public interface OperationsClient { * * @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. + * @return a list of StoragePool operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface OperationsClient { * @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. + * @return a list of StoragePool operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/ResourceSkusClient.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/ResourceSkusClient.java index d2b34c3c58da..8276515a7623 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/ResourceSkusClient.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/ResourceSkusClient.java @@ -19,7 +19,7 @@ public interface ResourceSkusClient { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location); @@ -32,7 +32,7 @@ public interface ResourceSkusClient { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @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/models/DiskPoolCreateProperties.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolCreateProperties.java index 0227190d6f2f..c4c7a7687b1e 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolCreateProperties.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolCreateProperties.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.models.Disk; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties for Disk Pool create or update request. */ @Fluent public final class DiskPoolCreateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolCreateProperties.class); - /* * Logical zone for Disk Pool resource; example: ["1"]. */ @@ -130,10 +127,12 @@ public void validate() { disks().forEach(e -> e.validate()); } if (subnetId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property subnetId in model DiskPoolCreateProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolCreateProperties.class); } 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 index 6b92164cba6c..b02d8805342b 100644 --- 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 @@ -11,7 +11,6 @@ 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; @@ -19,8 +18,6 @@ /** Response for Disk Pool request. */ @Fluent public final class DiskPoolInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolInner.class); - /* * Determines the SKU of the Disk pool */ @@ -291,7 +288,7 @@ public void validate() { innerSku().validate(); } if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model DiskPoolInner")); } else { @@ -301,4 +298,6 @@ public void validate() { systemData().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolInner.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolProperties.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolProperties.java index e78983b8414c..8c7764235c74 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolProperties.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolProperties.java @@ -9,15 +9,12 @@ import com.azure.resourcemanager.storagepool.models.Disk; import com.azure.resourcemanager.storagepool.models.OperationalStatus; import com.azure.resourcemanager.storagepool.models.ProvisioningStates; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Disk Pool response properties. */ @Fluent public final class DiskPoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolProperties.class); - /* * State of the operation on the resource. */ @@ -170,13 +167,13 @@ public DiskPoolProperties withAdditionalCapabilities(List additionalCapa */ public void validate() { if (availabilityZones() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property availabilityZones in model DiskPoolProperties")); } if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property status in model DiskPoolProperties")); } @@ -184,9 +181,11 @@ public void validate() { disks().forEach(e -> e.validate()); } if (subnetId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property subnetId in model DiskPoolProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolProperties.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolUpdateProperties.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolUpdateProperties.java index f15de515593d..b225b2285f82 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolUpdateProperties.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/DiskPoolUpdateProperties.java @@ -5,17 +5,13 @@ 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.Disk; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties for Disk Pool update request. */ @Fluent public final class DiskPoolUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolUpdateProperties.class); - /* * List of Azure Managed Disks to attach to a Disk Pool. */ 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 index 476ac6af49ba..cd374dce779c 100644 --- 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagepool.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Disk Pool SKU Details. */ @Immutable public final class DiskPoolZoneInfoInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolZoneInfoInner.class); - /* * Logical zone for Disk Pool resource; example: ["1"]. */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetCreateProperties.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetCreateProperties.java index 6add6b652d81..eb3373945e71 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetCreateProperties.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetCreateProperties.java @@ -9,15 +9,12 @@ import com.azure.resourcemanager.storagepool.models.Acl; import com.azure.resourcemanager.storagepool.models.IscsiLun; import com.azure.resourcemanager.storagepool.models.IscsiTargetAclMode; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties for iSCSI Target create or update request. */ @Fluent public final class IscsiTargetCreateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetCreateProperties.class); - /* * Mode for Target connectivity. */ @@ -131,7 +128,7 @@ public IscsiTargetCreateProperties withLuns(List luns) { */ public void validate() { if (aclMode() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property aclMode in model IscsiTargetCreateProperties")); @@ -143,4 +140,6 @@ public void validate() { luns().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiTargetCreateProperties.class); } 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 index 1f7f7171c523..f10f729f9455 100644 --- 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 @@ -13,15 +13,12 @@ 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. */ @Fluent public final class IscsiTargetInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetInner.class); - /* * Properties for iSCSI Target operations. */ @@ -269,7 +266,7 @@ public List sessions() { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model IscsiTargetInner")); @@ -280,4 +277,6 @@ public void validate() { systemData().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiTargetInner.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetProperties.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetProperties.java index 37cd6b9b721a..64f0bbc9886a 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetProperties.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetProperties.java @@ -11,15 +11,12 @@ import com.azure.resourcemanager.storagepool.models.IscsiTargetAclMode; import com.azure.resourcemanager.storagepool.models.OperationalStatus; import com.azure.resourcemanager.storagepool.models.ProvisioningStates; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response properties for iSCSI Target operations. */ @Fluent public final class IscsiTargetProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetProperties.class); - /* * Mode for Target connectivity. */ @@ -241,7 +238,7 @@ public List sessions() { */ public void validate() { if (aclMode() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property aclMode in model IscsiTargetProperties")); } @@ -252,14 +249,16 @@ public void validate() { luns().forEach(e -> e.validate()); } if (targetIqn() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property targetIqn in model IscsiTargetProperties")); } if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property status in model IscsiTargetProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiTargetProperties.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetUpdateProperties.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetUpdateProperties.java index ce53a9643d2d..999734bb3365 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetUpdateProperties.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/IscsiTargetUpdateProperties.java @@ -5,18 +5,14 @@ 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.Acl; import com.azure.resourcemanager.storagepool.models.IscsiLun; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties for iSCSI Target update request. */ @Fluent public final class IscsiTargetUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetUpdateProperties.class); - /* * Access Control List (ACL) for an iSCSI Target; defines LUN masking * policy 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 index 3b7a62c19bc0..b481c061a505 100644 --- 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 @@ -5,17 +5,13 @@ 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. diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/ResourceSkuInfoInner.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/ResourceSkuInfoInner.java index c88c8666723a..e948bda52af0 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/ResourceSkuInfoInner.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/ResourceSkuInfoInner.java @@ -5,19 +5,15 @@ package com.azure.resourcemanager.storagepool.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.models.ResourceSkuCapability; import com.azure.resourcemanager.storagepool.models.ResourceSkuLocationInfo; import com.azure.resourcemanager.storagepool.models.ResourceSkuRestrictions; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Resource SKU Details. */ @Immutable public final class ResourceSkuInfoInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuInfoInner.class); - /* * StoragePool RP API version */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/Sku.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/Sku.java index a8fa238dd0a4..d74ae450a983 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/Sku.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/fluent/models/Sku.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Sku for ARM resource. */ @Fluent public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * Sku name */ @@ -73,8 +70,10 @@ public Sku withTier(String tier) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); } 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 index f7cc7240298b..726cfefca9b5 100644 --- 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 @@ -7,14 +7,11 @@ 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 */ @@ -155,13 +152,13 @@ public StoragePoolRPOperationInner withOrigin(String origin) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model StoragePoolRPOperationInner")); } if (display() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property display in model StoragePoolRPOperationInner")); @@ -169,4 +166,6 @@ public void validate() { display().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(StoragePoolRPOperationInner.class); } 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 index d38bbc1dad51..f826fb0b7eff 100644 --- 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 @@ -25,7 +25,6 @@ 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; @@ -33,8 +32,6 @@ /** 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; @@ -89,7 +86,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { @@ -140,7 +138,8 @@ private Mono> listSinglePageAsync(String lo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, Context context) { @@ -187,7 +186,7 @@ private Mono> listSinglePageAsync(String lo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location) { @@ -202,7 +201,7 @@ private PagedFlux listAsync(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, Context context) { @@ -217,7 +216,7 @@ private PagedFlux listAsync(String location, Context cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { @@ -232,7 +231,7 @@ public PagedIterable list(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { @@ -246,7 +245,8 @@ public PagedIterable list(String location, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -282,7 +282,8 @@ private Mono> listNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 index c17c1e48a53b..cdeef813fd93 100644 --- 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 @@ -11,10 +11,9 @@ 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 static final ClientLogger LOGGER = new ClientLogger(DiskPoolZonesImpl.class); private final DiskPoolZonesClient innerClient; 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 index 2db590d3ff09..398ae42ae338 100644 --- 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 @@ -31,7 +31,6 @@ 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; @@ -47,8 +46,6 @@ /** 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; @@ -256,7 +253,8 @@ Mono> listOutboundNetworkDependenciesE * * @throws 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. + * @return a list of Disk Pools in a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -302,7 +300,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of Disk Pools in a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -343,7 +342,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws 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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -358,7 +357,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -371,7 +370,7 @@ private PagedFlux listAsync(Context context) { * * @throws 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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -385,7 +384,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -399,7 +398,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of DiskPools in a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -451,7 +451,8 @@ private Mono> listByResourceGroupSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of DiskPools in a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -500,7 +501,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -517,7 +518,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -533,7 +534,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -548,7 +549,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -565,7 +566,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -623,7 +624,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -677,7 +678,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiskPoolInner> beginCreateOrUpdateAsync( @@ -687,7 +688,11 @@ private PollerFlux, DiskPoolInner> beginCreateOrUpdate return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DiskPoolInner.class, DiskPoolInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DiskPoolInner.class, + DiskPoolInner.class, + this.client.getContext()); } /** @@ -701,7 +706,7 @@ private PollerFlux, DiskPoolInner> beginCreateOrUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiskPoolInner> beginCreateOrUpdateAsync( @@ -725,7 +730,7 @@ private PollerFlux, DiskPoolInner> beginCreateOrUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiskPoolInner> beginCreateOrUpdate( @@ -744,7 +749,7 @@ public SyncPoller, DiskPoolInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiskPoolInner> beginCreateOrUpdate( @@ -763,7 +768,7 @@ public SyncPoller, DiskPoolInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -784,7 +789,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -840,7 +845,7 @@ public DiskPoolInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -897,7 +902,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -950,7 +955,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiskPoolInner> beginUpdateAsync( @@ -960,7 +965,11 @@ private PollerFlux, DiskPoolInner> beginUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DiskPoolInner.class, DiskPoolInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DiskPoolInner.class, + DiskPoolInner.class, + this.client.getContext()); } /** @@ -973,7 +982,7 @@ private PollerFlux, DiskPoolInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiskPoolInner> beginUpdateAsync( @@ -996,7 +1005,7 @@ private PollerFlux, DiskPoolInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiskPoolInner> beginUpdate( @@ -1014,7 +1023,7 @@ public SyncPoller, DiskPoolInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for Disk Pool request. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiskPoolInner> beginUpdate( @@ -1031,7 +1040,7 @@ public SyncPoller, DiskPoolInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1051,7 +1060,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for Disk Pool request on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1104,7 +1113,7 @@ public DiskPoolInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String diskPoolName) { @@ -1153,7 +1162,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1199,14 +1208,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) 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); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1219,7 +1229,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1240,7 +1250,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String diskPoolName) { @@ -1257,7 +1267,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1274,7 +1284,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String diskPoolName) { @@ -1291,7 +1301,7 @@ private Mono deleteAsync(String resourceGroupName, String diskPoolName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String diskPoolName, Context context) { @@ -1339,7 +1349,7 @@ public void delete(String resourceGroupName, String diskPoolName, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a Disk pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1388,7 +1398,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a Disk pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1433,7 +1443,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a Disk pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String diskPoolName) { @@ -1472,7 +1482,7 @@ public DiskPoolInner getByResourceGroup(String resourceGroupName, String diskPoo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a Disk pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1488,7 +1498,8 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the network endpoints of all outbound dependencies of a Disk Pool along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1546,7 +1557,8 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the network endpoints of all outbound dependencies of a Disk Pool along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1601,7 +1613,8 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( @@ -1620,7 +1633,8 @@ private PagedFlux listOutboundNetworkDependenc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( @@ -1638,7 +1652,8 @@ private PagedFlux listOutboundNetworkDependenc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listOutboundNetworkDependenciesEndpoints( @@ -1655,7 +1670,8 @@ public PagedIterable listOutboundNetworkDepend * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listOutboundNetworkDependenciesEndpoints( @@ -1673,7 +1689,7 @@ public PagedIterable listOutboundNetworkDepend * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String diskPoolName) { @@ -1722,7 +1738,7 @@ private Mono>> startWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1768,14 +1784,15 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) 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); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1788,7 +1805,7 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( @@ -1809,7 +1826,7 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart(String resourceGroupName, String diskPoolName) { @@ -1826,7 +1843,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( @@ -1843,7 +1860,7 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String diskPoolName) { @@ -1860,7 +1877,7 @@ private Mono startAsync(String resourceGroupName, String diskPoolName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String diskPoolName, Context context) { @@ -1909,7 +1926,7 @@ public void start(String resourceGroupName, String diskPoolName, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deallocateWithResponseAsync( @@ -1959,7 +1976,7 @@ private Mono>> deallocateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deallocateWithResponseAsync( @@ -2005,14 +2022,15 @@ private Mono>> deallocateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) 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); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2025,7 +2043,7 @@ private PollerFlux, Void> beginDeallocateAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeallocateAsync( @@ -2046,7 +2064,7 @@ private PollerFlux, Void> beginDeallocateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeallocate(String resourceGroupName, String diskPoolName) { @@ -2063,7 +2081,7 @@ public SyncPoller, Void> beginDeallocate(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeallocate( @@ -2080,7 +2098,7 @@ public SyncPoller, Void> beginDeallocate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deallocateAsync(String resourceGroupName, String diskPoolName) { @@ -2099,7 +2117,7 @@ private Mono deallocateAsync(String resourceGroupName, String diskPoolName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deallocateAsync(String resourceGroupName, String diskPoolName, Context context) { @@ -2148,7 +2166,7 @@ public void deallocate(String resourceGroupName, String diskPoolName, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> upgradeWithResponseAsync(String resourceGroupName, String diskPoolName) { @@ -2197,7 +2215,7 @@ private Mono>> upgradeWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> upgradeWithResponseAsync( @@ -2243,14 +2261,15 @@ private Mono>> upgradeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUpgradeAsync(String resourceGroupName, String diskPoolName) { Mono>> mono = upgradeWithResponseAsync(resourceGroupName, diskPoolName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2263,7 +2282,7 @@ private PollerFlux, Void> beginUpgradeAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUpgradeAsync( @@ -2284,7 +2303,7 @@ private PollerFlux, Void> beginUpgradeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpgrade(String resourceGroupName, String diskPoolName) { @@ -2301,7 +2320,7 @@ public SyncPoller, Void> beginUpgrade(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpgrade( @@ -2318,7 +2337,7 @@ public SyncPoller, Void> beginUpgrade( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono upgradeAsync(String resourceGroupName, String diskPoolName) { @@ -2335,7 +2354,7 @@ private Mono upgradeAsync(String resourceGroupName, String diskPoolName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono upgradeAsync(String resourceGroupName, String diskPoolName, Context context) { @@ -2382,7 +2401,7 @@ public void upgrade(String resourceGroupName, String diskPoolName, Context conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list of Disk Pools along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2419,7 +2438,7 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list of Disk Pools along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -2454,7 +2473,7 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list of Disk Pools along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2491,7 +2510,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list of Disk Pools along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -2527,7 +2546,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return collection of Outbound Environment Endpoints along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2568,7 +2588,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return collection of Outbound Environment Endpoints along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> 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 index b9fe74a6d261..49f874065276 100644 --- 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 @@ -15,10 +15,9 @@ 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 static final ClientLogger LOGGER = new ClientLogger(DiskPoolsImpl.class); private final DiskPoolsClient innerClient; @@ -123,7 +122,7 @@ public void upgrade(String resourceGroupName, String diskPoolName, Context conte public DiskPool getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -131,7 +130,7 @@ public DiskPool getById(String id) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); @@ -142,7 +141,7 @@ public DiskPool getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -150,7 +149,7 @@ public Response getByIdWithResponse(String id, Context context) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); @@ -161,7 +160,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -169,7 +168,7 @@ public void deleteById(String id) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); @@ -180,7 +179,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -188,7 +187,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); 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 index 761c81da39c7..b1e10705fd8e 100644 --- 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 @@ -30,7 +30,6 @@ 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; @@ -44,8 +43,6 @@ /** 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; @@ -170,7 +167,7 @@ Mono> listByDiskPoolNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return iSCSI Targets in a Disk pool along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDiskPoolSinglePageAsync( @@ -228,7 +225,7 @@ private Mono> listByDiskPoolSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return iSCSI Targets in a Disk pool along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDiskPoolSinglePageAsync( @@ -282,7 +279,7 @@ private Mono> listByDiskPoolSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDiskPoolAsync(String resourceGroupName, String diskPoolName) { @@ -300,7 +297,7 @@ private PagedFlux listByDiskPoolAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDiskPoolAsync( @@ -318,7 +315,7 @@ private PagedFlux listByDiskPoolAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName) { @@ -334,7 +331,7 @@ public PagedIterable listByDiskPool(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDiskPool( @@ -352,7 +349,7 @@ public PagedIterable listByDiskPool( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -419,7 +416,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -483,7 +480,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiTargetInner> beginCreateOrUpdateAsync( @@ -496,7 +493,11 @@ private PollerFlux, IscsiTargetInner> beginCreateOr return this .client .getLroResult( - mono, this.client.getHttpPipeline(), IscsiTargetInner.class, IscsiTargetInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + IscsiTargetInner.class, + IscsiTargetInner.class, + this.client.getContext()); } /** @@ -510,7 +511,7 @@ private PollerFlux, IscsiTargetInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiTargetInner> beginCreateOrUpdateAsync( @@ -539,7 +540,7 @@ private PollerFlux, IscsiTargetInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiTargetInner> beginCreateOrUpdate( @@ -562,7 +563,7 @@ public SyncPoller, IscsiTargetInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiTargetInner> beginCreateOrUpdate( @@ -586,7 +587,7 @@ public SyncPoller, IscsiTargetInner> beginCreateOrU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -610,7 +611,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -680,7 +681,7 @@ public IscsiTargetInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -747,7 +748,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -811,7 +812,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiTargetInner> beginUpdateAsync( @@ -824,7 +825,11 @@ private PollerFlux, IscsiTargetInner> beginUpdateAs return this .client .getLroResult( - mono, this.client.getHttpPipeline(), IscsiTargetInner.class, IscsiTargetInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + IscsiTargetInner.class, + IscsiTargetInner.class, + this.client.getContext()); } /** @@ -838,7 +843,7 @@ private PollerFlux, IscsiTargetInner> beginUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiTargetInner> beginUpdateAsync( @@ -867,7 +872,7 @@ private PollerFlux, IscsiTargetInner> beginUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiTargetInner> beginUpdate( @@ -890,7 +895,7 @@ public SyncPoller, IscsiTargetInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of response for iSCSI Target requests. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiTargetInner> beginUpdate( @@ -913,7 +918,7 @@ public SyncPoller, IscsiTargetInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -937,7 +942,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return response for iSCSI Target requests on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1004,7 +1009,7 @@ public IscsiTargetInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1059,7 +1064,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1110,7 +1115,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1119,7 +1124,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, diskPoolName, iscsiTargetName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1132,7 +1138,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1154,7 +1160,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1172,7 +1178,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1189,7 +1195,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String diskPoolName, String iscsiTargetName) { @@ -1208,7 +1214,7 @@ private Mono deleteAsync(String resourceGroupName, String diskPoolName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1258,7 +1264,7 @@ public void delete(String resourceGroupName, String diskPoolName, String iscsiTa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an iSCSI Target along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1313,7 +1319,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an iSCSI Target along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1364,7 +1370,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an iSCSI Target on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String diskPoolName, String iscsiTargetName) { @@ -1405,7 +1411,7 @@ public IscsiTargetInner get(String resourceGroupName, String diskPoolName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return an iSCSI Target along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -1420,7 +1426,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 iSCSI Targets. + * @return list of iSCSI Targets along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDiskPoolNextSinglePageAsync(String nextLink) { @@ -1456,7 +1462,7 @@ private Mono> listByDiskPoolNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 iSCSI Targets. + * @return list of iSCSI Targets along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDiskPoolNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetsImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetsImpl.java index fd07f3f89fcd..63dd0827a934 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetsImpl.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/IscsiTargetsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetInner; import com.azure.resourcemanager.storagepool.models.IscsiTarget; import com.azure.resourcemanager.storagepool.models.IscsiTargets; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class IscsiTargetsImpl implements IscsiTargets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IscsiTargetsImpl.class); private final IscsiTargetsClient innerClient; @@ -74,7 +73,7 @@ public Response getWithResponse( public IscsiTarget getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -82,14 +81,14 @@ public IscsiTarget getById(String id) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); } String iscsiTargetName = Utils.getValueFromIdByName(id, "iscsiTargets"); if (iscsiTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiTargets'.", id))); @@ -100,7 +99,7 @@ public IscsiTarget getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -108,14 +107,14 @@ public Response getByIdWithResponse(String id, Context context) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); } String iscsiTargetName = Utils.getValueFromIdByName(id, "iscsiTargets"); if (iscsiTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiTargets'.", id))); @@ -126,7 +125,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,14 +133,14 @@ public void deleteById(String id) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); } String iscsiTargetName = Utils.getValueFromIdByName(id, "iscsiTargets"); if (iscsiTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiTargets'.", id))); @@ -152,7 +151,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,14 +159,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String diskPoolName = Utils.getValueFromIdByName(id, "diskPools"); if (diskPoolName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'diskPools'.", id))); } String iscsiTargetName = Utils.getValueFromIdByName(id, "iscsiTargets"); if (iscsiTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiTargets'.", id))); diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsClientImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsClientImpl.java index b99f6e14fda9..9b0ce88c3ad7 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsClientImpl.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsClientImpl.java @@ -24,7 +24,6 @@ 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.OperationsClient; import com.azure.resourcemanager.storagepool.fluent.models.StoragePoolRPOperationInner; import com.azure.resourcemanager.storagepool.models.StoragePoolOperationListResult; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -74,7 +71,8 @@ Mono> list( * * @throws 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. + * @return a list of StoragePool operations along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -102,7 +100,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of StoragePool operations along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -127,7 +126,7 @@ private Mono> listSinglePageAsync(Con * * @throws 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. + * @return a list of StoragePool operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -141,7 +140,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of StoragePool operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -153,7 +152,7 @@ private PagedFlux listAsync(Context context) { * * @throws 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. + * @return a list of StoragePool operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -167,7 +166,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of StoragePool operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsImpl.java index 5b43336d5f82..4cbb97eb886e 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsImpl.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.storagepool.fluent.models.StoragePoolRPOperationInner; import com.azure.resourcemanager.storagepool.models.Operations; import com.azure.resourcemanager.storagepool.models.StoragePoolRPOperation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusClientImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusClientImpl.java index cc0b7d6ddece..20c453bdef1c 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusClientImpl.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusClientImpl.java @@ -25,7 +25,6 @@ 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.ResourceSkusClient; import com.azure.resourcemanager.storagepool.fluent.models.ResourceSkuInfoInner; import com.azure.resourcemanager.storagepool.models.ResourceSkuListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ResourceSkusClient. */ public final class ResourceSkusClientImpl implements ResourceSkusClient { - private final ClientLogger logger = new ClientLogger(ResourceSkusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ResourceSkusService service; @@ -89,7 +86,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { @@ -140,7 +138,8 @@ private Mono> listSinglePageAsync(String loc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, Context context) { @@ -187,7 +186,7 @@ private Mono> listSinglePageAsync(String loc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location) { @@ -202,7 +201,7 @@ private PagedFlux listAsync(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, Context context) { @@ -217,7 +216,7 @@ private PagedFlux listAsync(String location, Context conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { @@ -232,7 +231,7 @@ public PagedIterable list(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { @@ -246,7 +245,8 @@ public PagedIterable list(String location, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -282,7 +282,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return list Disk Pool skus operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusImpl.java index 47e78751cc29..f219f925be25 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusImpl.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/ResourceSkusImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.storagepool.fluent.models.ResourceSkuInfoInner; import com.azure.resourcemanager.storagepool.models.ResourceSkuInfo; import com.azure.resourcemanager.storagepool.models.ResourceSkus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ResourceSkusImpl implements ResourceSkus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkusImpl.class); private final ResourceSkusClient innerClient; diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementBuilder.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementBuilder.java index 3b68aad879b0..45e62b42ffc8 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementBuilder.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public StoragePoolManagementBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the StoragePoolManagementBuilder. */ - public StoragePoolManagementBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public StoragePoolManagementBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the StoragePoolManagementBuilder. */ - public StoragePoolManagementBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public StoragePoolManagementBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -126,15 +125,12 @@ public StoragePoolManagementImpl buildClient() { if (environment == null) { this.environment = AzureEnvironment.AZURE; } + if (pipeline == null) { + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + } if (defaultPollInterval == null) { this.defaultPollInterval = Duration.ofSeconds(30); } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementImpl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementImpl.java index cc9cb6342d14..0f367daf35c1 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementImpl.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/implementation/StoragePoolManagementImpl.java @@ -40,8 +40,6 @@ /** Initializes a new instance of the StoragePoolManagementImpl type. */ @ServiceClient(builder = StoragePoolManagementBuilder.class) public final class StoragePoolManagementImpl implements StoragePoolManagement { - private final ClientLogger logger = new ClientLogger(StoragePoolManagementImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -287,7 +285,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -346,4 +344,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(StoragePoolManagementImpl.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Acl.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Acl.java index 68af80495217..1274a8c8fa6b 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Acl.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Acl.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Access Control List (ACL) for an iSCSI Target; defines LUN masking policy. */ @Fluent public final class Acl { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Acl.class); - /* * iSCSI initiator IQN (iSCSI Qualified Name); example: * "iqn.2005-03.org.iscsi:client". @@ -77,13 +74,15 @@ public Acl withMappedLuns(List mappedLuns) { */ public void validate() { if (initiatorIqn() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property initiatorIqn in model Acl")); } if (mappedLuns() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property mappedLuns in model Acl")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Acl.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/CreatedByType.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/CreatedByType.java index 99f44e16e191..96402ba65a85 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/CreatedByType.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/CreatedByType.java @@ -33,7 +33,11 @@ public static CreatedByType fromString(String name) { return fromString(name, CreatedByType.class); } - /** @return known CreatedByType values. */ + /** + * Gets known CreatedByType values. + * + * @return known CreatedByType values. + */ public static Collection values() { return values(CreatedByType.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Disk.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Disk.java index 457339e308d4..48cc84c07ede 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Disk.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Disk.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure Managed Disk to attach to the Disk Pool. */ @Fluent public final class Disk { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Disk.class); - /* * Unique Azure Resource ID of the Managed Disk. */ @@ -47,8 +44,10 @@ public Disk withId(String id) { */ public void validate() { if (id() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property id in model Disk")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Disk.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolCreate.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolCreate.java index f1976e3ba057..60331cbd9582 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolCreate.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolCreate.java @@ -9,7 +9,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolCreateProperties; import com.azure.resourcemanager.storagepool.fluent.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -17,8 +16,6 @@ /** Request payload for create or update Disk Pool request. */ @Fluent public final class DiskPoolCreate extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolCreate.class); - /* * Determines the SKU of the Disk Pool */ @@ -226,18 +223,20 @@ public DiskPoolCreate withAdditionalCapabilities(List additionalCapabili */ public void validate() { if (sku() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property sku in model DiskPoolCreate")); } else { sku().validate(); } if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model DiskPoolCreate")); } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolCreate.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolListResult.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolListResult.java index 08ac103a7daa..5c8d420e0eb6 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolListResult.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolListResult.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of Disk Pools. */ @Fluent public final class DiskPoolListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolListResult.class); - /* * An array of Disk pool objects. */ @@ -64,11 +61,13 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model DiskPoolListResult")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolListResult.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolUpdate.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolUpdate.java index 4942f52a991f..88a8747e2fb1 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolUpdate.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolUpdate.java @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolUpdateProperties; import com.azure.resourcemanager.storagepool.fluent.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +16,6 @@ /** Request payload for Update Disk Pool request. */ @Fluent public final class DiskPoolUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolUpdate.class); - /* * Azure resource id. Indicates if this resource is managed by another * Azure resource. @@ -170,7 +167,7 @@ public DiskPoolUpdate withDisks(List disks) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property innerProperties in model DiskPoolUpdate")); } else { @@ -180,4 +177,6 @@ public void validate() { sku().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiskPoolUpdate.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZoneListResult.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZoneListResult.java index a52b68e4961c..11af8b14de7b 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZoneListResult.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZoneListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.DiskPoolZoneInfoInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List Disk Pool skus operation response. */ @Immutable public final class DiskPoolZoneListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskPoolZoneListResult.class); - /* * The list of Disk Pool Skus. */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZones.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZones.java index 07ac319f6a4e..5448dba2ab9c 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZones.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPoolZones.java @@ -16,7 +16,7 @@ public interface DiskPoolZones { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(String location); @@ -28,7 +28,7 @@ public interface DiskPoolZones { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(String location, Context context); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPools.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPools.java index 3a588309da7c..2efc9c2f003e 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPools.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/DiskPools.java @@ -15,7 +15,7 @@ public interface DiskPools { * * @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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface DiskPools { * @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. + * @return a list of Disk Pools in a subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -37,7 +37,7 @@ public interface DiskPools { * @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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -49,7 +49,7 @@ public interface DiskPools { * @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. + * @return a list of DiskPools in a resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -99,7 +99,7 @@ public interface DiskPools { * @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. + * @return a Disk pool along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String diskPoolName, Context context); @@ -111,7 +111,8 @@ public interface DiskPools { * @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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedIterable}. */ PagedIterable listOutboundNetworkDependenciesEndpoints( String resourceGroupName, String diskPoolName); @@ -125,7 +126,8 @@ PagedIterable listOutboundNetworkDependenciesEndpoi * @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. + * @return the network endpoints of all outbound dependencies of a Disk Pool as paginated response with {@link + * PagedIterable}. */ PagedIterable listOutboundNetworkDependenciesEndpoints( String resourceGroupName, String diskPoolName, Context context); @@ -212,7 +214,7 @@ PagedIterable listOutboundNetworkDependenciesEndpoi * @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. + * @return a Disk pool along with {@link Response}. */ DiskPool getById(String id); @@ -224,7 +226,7 @@ PagedIterable listOutboundNetworkDependenciesEndpoi * @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. + * @return a Disk pool along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDependency.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDependency.java index 484ae6a262ee..0a55438f729f 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDependency.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDependency.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A domain name that a service is reached at, including details of the current connection status. */ @Fluent public final class EndpointDependency { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointDependency.class); - /* * The domain name of the dependency. */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDetail.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDetail.java index 970d3b39134e..2aeb51d9a4ef 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDetail.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/EndpointDetail.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Current TCP connectivity information from the App Service Environment to a single endpoint. */ @Fluent public final class EndpointDetail { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointDetail.class); - /* * An IP Address that Domain Name currently resolves to. */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiLun.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiLun.java index 07ba50d93543..7cb882fe133d 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiLun.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiLun.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** LUN to expose the Azure Managed Disk. */ @Fluent public final class IscsiLun { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiLun.class); - /* * User defined name for iSCSI LUN; example: "lun0" */ @@ -88,14 +85,16 @@ public Integer lun() { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property name in model IscsiLun")); } if (managedDiskAzureResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property managedDiskAzureResourceId in model IscsiLun")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiLun.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetAclMode.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetAclMode.java index 6aa05bf78429..1c76fe4ad497 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetAclMode.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetAclMode.java @@ -27,7 +27,11 @@ public static IscsiTargetAclMode fromString(String name) { return fromString(name, IscsiTargetAclMode.class); } - /** @return known IscsiTargetAclMode values. */ + /** + * Gets known IscsiTargetAclMode values. + * + * @return known IscsiTargetAclMode values. + */ public static Collection values() { return values(IscsiTargetAclMode.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetCreate.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetCreate.java index f8da2096c14c..6205073e8202 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetCreate.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetCreate.java @@ -8,15 +8,12 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetCreateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Payload for iSCSI Target create or update requests. */ @Fluent public final class IscsiTargetCreate extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetCreate.class); - /* * Properties for iSCSI Target create request. */ @@ -184,7 +181,7 @@ public IscsiTargetCreate withLuns(List luns) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model IscsiTargetCreate")); @@ -192,4 +189,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiTargetCreate.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetList.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetList.java index 9eafd75eaccf..1a8f2f94d6bd 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetList.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetList.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of iSCSI Targets. */ @Fluent public final class IscsiTargetList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetList.class); - /* * An array of iSCSI Targets in a Disk Pool. */ @@ -64,11 +61,13 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model IscsiTargetList")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiTargetList.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetUpdate.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetUpdate.java index 61028ef7bf88..b6397738f025 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetUpdate.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetUpdate.java @@ -8,15 +8,12 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Payload for iSCSI Target update requests. */ @Fluent public final class IscsiTargetUpdate extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IscsiTargetUpdate.class); - /* * Properties for iSCSI Target update request. */ @@ -138,7 +135,7 @@ public IscsiTargetUpdate withLuns(List luns) { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model IscsiTargetUpdate")); @@ -146,4 +143,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiTargetUpdate.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargets.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargets.java index 2441e5849dc1..d5c880848a72 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargets.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargets.java @@ -18,7 +18,7 @@ public interface IscsiTargets { * @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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}. */ PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName); @@ -31,7 +31,7 @@ public interface IscsiTargets { * @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. + * @return iSCSI Targets in a Disk pool as paginated response with {@link PagedIterable}. */ PagedIterable listByDiskPool(String resourceGroupName, String diskPoolName, Context context); @@ -83,7 +83,7 @@ public interface IscsiTargets { * @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. + * @return an iSCSI Target along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String diskPoolName, String iscsiTargetName, Context context); @@ -95,7 +95,7 @@ Response getWithResponse( * @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. + * @return an iSCSI Target along with {@link Response}. */ IscsiTarget getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @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. + * @return an iSCSI Target along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OperationalStatus.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OperationalStatus.java index 3ed5ae719afa..3dee5abc6d82 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OperationalStatus.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OperationalStatus.java @@ -45,7 +45,11 @@ public static OperationalStatus fromString(String name) { return fromString(name, OperationalStatus.class); } - /** @return known OperationalStatus values. */ + /** + * Gets known OperationalStatus values. + * + * @return known OperationalStatus values. + */ public static Collection values() { return values(OperationalStatus.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Operations.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Operations.java index 4daf2761c972..f1a367431121 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Operations.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/Operations.java @@ -14,7 +14,7 @@ public interface 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. + * @return a list of StoragePool operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface Operations { * @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. + * @return a list of StoragePool operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OutboundEnvironmentEndpointList.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OutboundEnvironmentEndpointList.java index e320e9900503..ac896686e7b7 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OutboundEnvironmentEndpointList.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/OutboundEnvironmentEndpointList.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.OutboundEnvironmentEndpointInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of Outbound Environment Endpoints. */ @Fluent public final class OutboundEnvironmentEndpointList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OutboundEnvironmentEndpointList.class); - /* * Collection of resources. */ @@ -64,7 +61,7 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property value in model OutboundEnvironmentEndpointList")); @@ -72,4 +69,6 @@ public void validate() { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(OutboundEnvironmentEndpointList.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ProvisioningStates.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ProvisioningStates.java index d40ef5e1cb6b..19b5613dd689 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ProvisioningStates.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ProvisioningStates.java @@ -45,7 +45,11 @@ public static ProvisioningStates fromString(String name) { return fromString(name, ProvisioningStates.class); } - /** @return known ProvisioningStates values. */ + /** + * Gets known ProvisioningStates values. + * + * @return known ProvisioningStates values. + */ public static Collection values() { return values(ProvisioningStates.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuCapability.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuCapability.java index 831392f75bcc..c4394990dd4b 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuCapability.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuCapability.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Capability a resource SKU has. */ @Immutable public final class ResourceSkuCapability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuCapability.class); - /* * Capability name */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuListResult.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuListResult.java index afe2aa648df5..9848ffb8633e 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuListResult.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.ResourceSkuInfoInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List Disk Pool skus operation response. */ @Fluent public final class ResourceSkuListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuListResult.class); - /* * The list of StoragePool resource skus. */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuLocationInfo.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuLocationInfo.java index 730aa2b06deb..3b225df386dd 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuLocationInfo.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuLocationInfo.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Zone and capability info for resource sku. */ @Immutable public final class ResourceSkuLocationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuLocationInfo.class); - /* * Location of the SKU */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictionInfo.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictionInfo.java index e1e216ae5502..c1e7da8c9809 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictionInfo.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictionInfo.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes an available Compute SKU Restriction Information. */ @Immutable public final class ResourceSkuRestrictionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuRestrictionInfo.class); - /* * Locations where the SKU is restricted */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictions.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictions.java index 166457921d18..60cebfb3f026 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictions.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuRestrictions.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes scaling information of a SKU. */ @Immutable public final class ResourceSkuRestrictions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuRestrictions.class); - /* * The type of restrictions. */ diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuZoneDetails.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuZoneDetails.java index ac3a7dbbaa97..23def85856ff 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuZoneDetails.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkuZoneDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes The zonal capabilities of a SKU. */ @Immutable public final class ResourceSkuZoneDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuZoneDetails.class); - /* * The set of zones that the SKU is available in with the specified * capabilities. diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkus.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkus.java index 0d2972d564f9..75bd19e43d41 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkus.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/ResourceSkus.java @@ -16,7 +16,7 @@ public interface ResourceSkus { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(String location); @@ -28,7 +28,7 @@ public interface ResourceSkus { * @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. + * @return list Disk Pool skus operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(String location, Context context); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationDisplay.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationDisplay.java index 25fa26296052..b510d1ddfaea 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationDisplay.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationDisplay.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Metadata about an operation. */ @Fluent public final class StoragePoolOperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StoragePoolOperationDisplay.class); - /* * Localized friendly form of the resource provider name. */ @@ -130,28 +127,30 @@ public StoragePoolOperationDisplay withDescription(String description) { */ public void validate() { if (provider() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property provider in model StoragePoolOperationDisplay")); } if (resource() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property resource in model StoragePoolOperationDisplay")); } if (operation() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property operation in model StoragePoolOperationDisplay")); } if (description() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property description in model StoragePoolOperationDisplay")); } } + + private static final ClientLogger LOGGER = new ClientLogger(StoragePoolOperationDisplay.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationListResult.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationListResult.java index 866b73a8237c..beb088cf2684 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationListResult.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/StoragePoolOperationListResult.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagepool.fluent.models.StoragePoolRPOperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of operations supported by the RP. */ @Fluent public final class StoragePoolOperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StoragePoolOperationListResult.class); - /* * An array of operations supported by the StoragePool RP. */ @@ -75,7 +72,7 @@ public StoragePoolOperationListResult withNextLink(String nextLink) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property value in model StoragePoolOperationListResult")); @@ -83,4 +80,6 @@ public void validate() { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(StoragePoolOperationListResult.class); } diff --git a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/SystemMetadata.java b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/SystemMetadata.java index f8eb3a2837a7..561dacd40cc0 100644 --- a/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/SystemMetadata.java +++ b/sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/SystemMetadata.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagepool.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Metadata pertaining to creation and last modification of the resource. */ @Fluent public final class SystemMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SystemMetadata.class); - /* * The identity that created the resource. */