diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md index 18b8a85bd4fb..3d536e58e1e5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.1 (2022-10-10) + +- Azure Resource Manager HDInsight client library for Java. This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-2021-06. 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/hdinsight/azure-resourcemanager-hdinsight/README.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/README.md index 8de2281fbc90..8a37e5ac1e6a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/README.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-hdinsight - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md index 18bc7dd0c696..f3f6e90431d3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md @@ -54,6 +54,10 @@ - [ListUsages](#locations_listusages) - [ValidateClusterCreateRequest](#locations_validateclustercreaterequest) +## Operations + +- [List](#operations_list) + ## PrivateEndpointConnections - [CreateOrUpdate](#privateendpointconnections_createorupdate) @@ -2524,6 +2528,27 @@ public final class LocationsValidateClusterCreateRequestSamples { } ``` +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ListHDInsightOperations.json + */ + /** + * Sample code: Lists all of the available operations. + * + * @param manager Entry point to HDInsightManager. + */ + public static void listsAllOfTheAvailableOperations(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + ### PrivateEndpointConnections_CreateOrUpdate ```java diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.java index 647280897a96..c9bcc42e13e2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.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; @@ -49,6 +52,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to HDInsightManager. HDInsight Management Client. */ public final class HDInsightManager { @@ -101,6 +105,19 @@ public static HDInsightManager authenticate(TokenCredential credential, AzurePro return configure().authenticate(credential, profile); } + /** + * Creates an instance of HDInsight service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the HDInsight service API instance. + */ + public static HDInsightManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new HDInsightManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create HDInsightManager with optional configuration. * @@ -112,13 +129,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() { @@ -179,6 +197,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. * @@ -186,9 +217,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; } @@ -210,7 +243,7 @@ public HDInsightManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.hdinsight") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -228,16 +261,34 @@ public HDInsightManager authenticate(TokenCredential credential, AzureProfile pr 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 = @@ -249,7 +300,11 @@ public HDInsightManager authenticate(TokenCredential credential, AzureProfile pr } } - /** @return Resource collection API of Clusters. */ + /** + * Gets the resource collection API of Clusters. It manages Cluster. + * + * @return Resource collection API of Clusters. + */ public Clusters clusters() { if (this.clusters == null) { this.clusters = new ClustersImpl(clientObject.getClusters(), this); @@ -257,7 +312,11 @@ public Clusters clusters() { return clusters; } - /** @return Resource collection API of Applications. */ + /** + * Gets the resource collection API of Applications. It manages Application. + * + * @return Resource collection API of Applications. + */ public Applications applications() { if (this.applications == null) { this.applications = new ApplicationsImpl(clientObject.getApplications(), this); @@ -265,7 +324,11 @@ public Applications applications() { return applications; } - /** @return Resource collection API of Locations. */ + /** + * Gets the resource collection API of Locations. + * + * @return Resource collection API of Locations. + */ public Locations locations() { if (this.locations == null) { this.locations = new LocationsImpl(clientObject.getLocations(), this); @@ -273,7 +336,11 @@ public Locations locations() { return locations; } - /** @return Resource collection API of Configurations. */ + /** + * Gets the resource collection API of Configurations. + * + * @return Resource collection API of Configurations. + */ public Configurations configurations() { if (this.configurations == null) { this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this); @@ -281,7 +348,11 @@ public Configurations configurations() { return configurations; } - /** @return Resource collection API of Extensions. */ + /** + * Gets the resource collection API of Extensions. + * + * @return Resource collection API of Extensions. + */ public Extensions extensions() { if (this.extensions == null) { this.extensions = new ExtensionsImpl(clientObject.getExtensions(), this); @@ -289,7 +360,11 @@ public Extensions extensions() { return extensions; } - /** @return Resource collection API of ScriptActions. */ + /** + * Gets the resource collection API of ScriptActions. + * + * @return Resource collection API of ScriptActions. + */ public ScriptActions scriptActions() { if (this.scriptActions == null) { this.scriptActions = new ScriptActionsImpl(clientObject.getScriptActions(), this); @@ -297,7 +372,11 @@ public ScriptActions scriptActions() { return scriptActions; } - /** @return Resource collection API of ScriptExecutionHistories. */ + /** + * Gets the resource collection API of ScriptExecutionHistories. + * + * @return Resource collection API of ScriptExecutionHistories. + */ public ScriptExecutionHistories scriptExecutionHistories() { if (this.scriptExecutionHistories == null) { this.scriptExecutionHistories = @@ -306,7 +385,11 @@ public ScriptExecutionHistories scriptExecutionHistories() { return scriptExecutionHistories; } - /** @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); @@ -314,7 +397,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of VirtualMachines. */ + /** + * Gets the resource collection API of VirtualMachines. + * + * @return Resource collection API of VirtualMachines. + */ public VirtualMachines virtualMachines() { if (this.virtualMachines == null) { this.virtualMachines = new VirtualMachinesImpl(clientObject.getVirtualMachines(), this); @@ -322,7 +409,11 @@ public VirtualMachines virtualMachines() { return virtualMachines; } - /** @return Resource collection API of PrivateEndpointConnections. */ + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ public PrivateEndpointConnections privateEndpointConnections() { if (this.privateEndpointConnections == null) { this.privateEndpointConnections = @@ -331,7 +422,11 @@ public PrivateEndpointConnections privateEndpointConnections() { return privateEndpointConnections; } - /** @return Resource collection API of PrivateLinkResources. */ + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ public PrivateLinkResources privateLinkResources() { if (this.privateLinkResources == null) { this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ApplicationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ApplicationsClient.java index a954e363c451..ad99f6a26718 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ApplicationsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ApplicationsClient.java @@ -24,7 +24,7 @@ public interface ApplicationsClient { * @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 result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -38,7 +38,7 @@ public interface ApplicationsClient { * @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 result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); @@ -49,13 +49,15 @@ public interface ApplicationsClient { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the specified application. + * @return properties of the specified application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner get(String resourceGroupName, String clusterName, String applicationName); + Response getWithResponse( + String resourceGroupName, String clusterName, String applicationName, Context context); /** * Gets properties of the specified application. @@ -63,15 +65,13 @@ public interface ApplicationsClient { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties of the specified application. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String applicationName, Context context); + ApplicationInner get(String resourceGroupName, String clusterName, String applicationName); /** * Creates applications for the HDInsight cluster. @@ -83,7 +83,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 the HDInsight cluster application. + * @return the {@link SyncPoller} for polling of the HDInsight cluster application. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationInner> beginCreate( @@ -100,7 +100,7 @@ SyncPoller, ApplicationInner> beginCreate( * @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 HDInsight cluster application. + * @return the {@link SyncPoller} for polling of the HDInsight cluster application. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationInner> beginCreate( @@ -156,7 +156,7 @@ ApplicationInner create( * @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( @@ -172,7 +172,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( @@ -212,14 +212,15 @@ SyncPoller, Void> beginDelete( * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationResultInner getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String applicationName, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String applicationName, String operationId, Context context); /** * Gets the async operation status. @@ -228,13 +229,12 @@ AsyncOperationResultInner getAzureAsyncOperationStatus( * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String applicationName, String operationId, Context context); + AsyncOperationResultInner getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String applicationName, String operationId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java index 4a9822d02824..24fa47127074 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java @@ -35,7 +35,7 @@ public interface ClustersClient { * @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 HDInsight cluster. + * @return the {@link SyncPoller} for polling of the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginCreate( @@ -51,7 +51,7 @@ SyncPoller, ClusterInner> beginCreate( * @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 HDInsight cluster. + * @return the {@link SyncPoller} for polling of the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginCreate( @@ -93,13 +93,15 @@ ClusterInner create( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param parameters The cluster patch request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the HDInsight cluster. + * @return the HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update(String resourceGroupName, String clusterName, ClusterPatchParameters parameters); + Response updateWithResponse( + String resourceGroupName, String clusterName, ClusterPatchParameters parameters, Context context); /** * Patch HDInsight cluster with the specified parameters. @@ -107,15 +109,13 @@ ClusterInner create( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param parameters The cluster patch request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String clusterName, ClusterPatchParameters parameters, Context context); + ClusterInner update(String resourceGroupName, String clusterName, ClusterPatchParameters parameters); /** * Deletes the specified HDInsight cluster. @@ -125,7 +125,7 @@ Response updateWithResponse( * @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 clusterName); @@ -139,7 +139,7 @@ Response updateWithResponse( * @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 clusterName, Context context); @@ -174,28 +174,28 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specified cluster. + * @return the specified cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets the specified cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specified cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterName, Context context); + ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); /** * Lists the HDInsight clusters in a resource group. @@ -204,7 +204,7 @@ 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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -217,7 +217,7 @@ 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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -232,7 +232,7 @@ 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginResize( @@ -249,7 +249,7 @@ SyncPoller, Void> beginResize( * @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> beginResize( @@ -303,7 +303,7 @@ void resize( * @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> beginUpdateAutoScaleConfiguration( @@ -323,7 +323,7 @@ SyncPoller, Void> beginUpdateAutoScaleConfiguration( * @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> beginUpdateAutoScaleConfiguration( @@ -376,7 +376,7 @@ void updateAutoScaleConfiguration( * * @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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -388,7 +388,7 @@ void updateAutoScaleConfiguration( * @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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -402,7 +402,7 @@ void updateAutoScaleConfiguration( * @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> beginRotateDiskEncryptionKey( @@ -418,7 +418,7 @@ SyncPoller, Void> beginRotateDiskEncryptionKey( * @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> beginRotateDiskEncryptionKey( @@ -458,28 +458,28 @@ void rotateDiskEncryptionKey( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gateway settings for the specified cluster. + * @return the gateway settings for the specified cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - GatewaySettingsInner getGatewaySettings(String resourceGroupName, String clusterName); + Response getGatewaySettingsWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets the gateway settings for the specified cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gateway settings for the specified cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getGatewaySettingsWithResponse( - String resourceGroupName, String clusterName, Context context); + GatewaySettingsInner getGatewaySettings(String resourceGroupName, String clusterName); /** * Configures the gateway settings on the specified cluster. @@ -490,7 +490,7 @@ Response getGatewaySettingsWithResponse( * @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> beginUpdateGatewaySettings( @@ -506,7 +506,7 @@ SyncPoller, Void> beginUpdateGatewaySettings( * @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> beginUpdateGatewaySettings( @@ -547,14 +547,15 @@ void updateGatewaySettings( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the azure async operation response. + * @return the azure async operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationResultInner getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context); /** * The the async operation status. @@ -562,15 +563,14 @@ AsyncOperationResultInner getAzureAsyncOperationStatus( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the azure async operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context); + AsyncOperationResultInner getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId); /** * Updates the cluster identity certificate. @@ -581,7 +581,7 @@ Response getAzureAsyncOperationStatusWithResponse( * @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> beginUpdateIdentityCertificate( @@ -597,7 +597,7 @@ SyncPoller, Void> beginUpdateIdentityCertificate( * @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> beginUpdateIdentityCertificate( @@ -647,7 +647,7 @@ void updateIdentityCertificate( * @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> beginExecuteScriptActions( @@ -663,7 +663,7 @@ SyncPoller, Void> beginExecuteScriptActions( * @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> beginExecuteScriptActions( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ConfigurationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ConfigurationsClient.java index 73c60b4becac..2a5a8e4e350c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ConfigurationsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ConfigurationsClient.java @@ -20,28 +20,28 @@ public interface ConfigurationsClient { * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 all configuration information for an HDI cluster. + * @return all configuration information for an HDI cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterConfigurationsInner list(String resourceGroupName, String clusterName); + Response listWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets all configuration information for an HDI cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 all configuration information for an HDI cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String clusterName, Context context); + ClusterConfigurationsInner list(String resourceGroupName, String clusterName); /** * Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings @@ -54,7 +54,7 @@ Response listWithResponse( * @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> beginUpdate( @@ -72,7 +72,7 @@ SyncPoller, Void> 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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginUpdate( @@ -125,13 +125,16 @@ void update( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configuration object for the specified configuration for the specified cluster. + * @return the configuration object for the specified configuration for the specified cluster along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Map get(String resourceGroupName, String clusterName, String configurationName); + Response> getWithResponse( + String resourceGroupName, String clusterName, String configurationName, Context context); /** * The configuration object for the specified cluster. This API is not recommended and might be removed in the @@ -140,13 +143,11 @@ void update( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration object for the specified configuration for the specified cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Map get(String resourceGroupName, String clusterName, String configurationName); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ExtensionsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ExtensionsClient.java index 1be269a81481..3b20687d1425 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ExtensionsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ExtensionsClient.java @@ -28,7 +28,7 @@ public interface ExtensionsClient { * @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> beginEnableMonitoring( @@ -44,7 +44,7 @@ SyncPoller, Void> beginEnableMonitoring( * @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> beginEnableMonitoring( @@ -83,28 +83,28 @@ void enableMonitoring( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Operations Management Suite (OMS) on the HDInsight cluster. + * @return the status of Operations Management Suite (OMS) on the HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterMonitoringResponseInner getMonitoringStatus(String resourceGroupName, String clusterName); + Response getMonitoringStatusWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets the status of Operations Management Suite (OMS) on the HDInsight cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Operations Management Suite (OMS) on the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getMonitoringStatusWithResponse( - String resourceGroupName, String clusterName, Context context); + ClusterMonitoringResponseInner getMonitoringStatus(String resourceGroupName, String clusterName); /** * Disables the Operations Management Suite (OMS) on the HDInsight cluster. @@ -114,7 +114,7 @@ Response getMonitoringStatusWithResponse( * @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> beginDisableMonitoring(String resourceGroupName, String clusterName); @@ -128,7 +128,7 @@ Response getMonitoringStatusWithResponse( * @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> beginDisableMonitoring( @@ -168,7 +168,7 @@ SyncPoller, Void> beginDisableMonitoring( * @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> beginEnableAzureMonitor( @@ -184,7 +184,7 @@ SyncPoller, Void> beginEnableAzureMonitor( * @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> beginEnableAzureMonitor( @@ -223,28 +223,28 @@ void enableAzureMonitor( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Azure Monitor on the HDInsight cluster. + * @return the status of Azure Monitor on the HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AzureMonitorResponseInner getAzureMonitorStatus(String resourceGroupName, String clusterName); + Response getAzureMonitorStatusWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets the status of Azure Monitor on the HDInsight cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Azure Monitor on the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAzureMonitorStatusWithResponse( - String resourceGroupName, String clusterName, Context context); + AzureMonitorResponseInner getAzureMonitorStatus(String resourceGroupName, String clusterName); /** * Disables the Azure Monitor on the HDInsight cluster. @@ -254,7 +254,7 @@ Response getAzureMonitorStatusWithResponse( * @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> beginDisableAzureMonitor(String resourceGroupName, String clusterName); @@ -268,7 +268,7 @@ Response getAzureMonitorStatusWithResponse( * @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> beginDisableAzureMonitor( @@ -309,7 +309,7 @@ SyncPoller, Void> beginDisableAzureMonitor( * @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> beginCreate( @@ -326,7 +326,7 @@ SyncPoller, Void> beginCreate( * @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> beginCreate( @@ -368,13 +368,15 @@ void create( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the extension properties for the specified HDInsight cluster extension. + * @return the extension properties for the specified HDInsight cluster extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterMonitoringResponseInner get(String resourceGroupName, String clusterName, String extensionName); + Response getWithResponse( + String resourceGroupName, String clusterName, String extensionName, Context context); /** * Gets the extension properties for the specified HDInsight cluster extension. @@ -382,15 +384,13 @@ void create( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the extension properties for the specified HDInsight cluster extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String extensionName, Context context); + ClusterMonitoringResponseInner get(String resourceGroupName, String clusterName, String extensionName); /** * Deletes the specified extension for HDInsight cluster. @@ -401,7 +401,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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String extensionName); @@ -416,7 +416,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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -456,14 +456,15 @@ SyncPoller, Void> beginDelete( * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationResultInner getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String extensionName, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String extensionName, String operationId, Context context); /** * Gets the async operation status. @@ -472,13 +473,12 @@ AsyncOperationResultInner getAzureAsyncOperationStatus( * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String extensionName, String operationId, Context context); + AsyncOperationResultInner getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String extensionName, String operationId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/LocationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/LocationsClient.java index acda743ef41c..3af45798e3f3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/LocationsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/LocationsClient.java @@ -23,160 +23,161 @@ public interface LocationsClient { * Gets the capabilities for the specified location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the capabilities for the specified location. + * @return the capabilities for the specified location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CapabilitiesResultInner getCapabilities(String location); + Response getCapabilitiesWithResponse(String location, Context context); /** * Gets the capabilities for the specified location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the capabilities for the specified location. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getCapabilitiesWithResponse(String location, Context context); + CapabilitiesResultInner getCapabilities(String location); /** * Lists the usages for the specified location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional usages for a subscription. + * @return the response for the operation to get regional usages for a subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - UsagesListResultInner listUsages(String location); + Response listUsagesWithResponse(String location, Context context); /** * Lists the usages for the specified location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response for the operation to get regional usages for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listUsagesWithResponse(String location, Context context); + UsagesListResultInner listUsages(String location); /** * Lists the billingSpecs for the specified subscription and location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional billingSpecs for a subscription. + * @return the response for the operation to get regional billingSpecs for a subscription along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BillingResponseListResultInner listBillingSpecs(String location); + Response listBillingSpecsWithResponse(String location, Context context); /** * Lists the billingSpecs for the specified subscription and location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response for the operation to get regional billingSpecs for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listBillingSpecsWithResponse(String location, Context context); + BillingResponseListResultInner listBillingSpecs(String location); /** * Get the async operation status. * * @param location The Azure location (region) for which to make the request. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationResultInner getAzureAsyncOperationStatus(String location, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String location, String operationId, Context context); /** * Get the async operation status. * * @param location The Azure location (region) for which to make the request. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAzureAsyncOperationStatusWithResponse( - String location, String operationId, Context context); + AsyncOperationResultInner getAzureAsyncOperationStatus(String location, String operationId); /** * Check the cluster name is available or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The request spec of checking name availability. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response spec of checking name availability. + * @return the response spec of checking name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityCheckResultInner checkNameAvailability( - String location, NameAvailabilityCheckRequestParameters parameters); + Response checkNameAvailabilityWithResponse( + String location, NameAvailabilityCheckRequestParameters parameters, Context context); /** * Check the cluster name is available or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The request spec of checking name availability. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response spec of checking name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityCheckRequestParameters parameters, Context context); + NameAvailabilityCheckResultInner checkNameAvailability( + String location, NameAvailabilityCheckRequestParameters parameters); /** * Validate the cluster create request spec is valid or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The cluster create request specification. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of cluster create request validation. + * @return the response of cluster create request validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterCreateValidationResultInner validateClusterCreateRequest( - String location, ClusterCreateRequestValidationParameters parameters); + Response validateClusterCreateRequestWithResponse( + String location, ClusterCreateRequestValidationParameters parameters, Context context); /** * Validate the cluster create request spec is valid or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The cluster create request specification. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of cluster create request validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response validateClusterCreateRequestWithResponse( - String location, ClusterCreateRequestValidationParameters parameters, Context context); + ClusterCreateValidationResultInner validateClusterCreateRequest( + String location, ClusterCreateRequestValidationParameters parameters); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/OperationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/OperationsClient.java index 5faa1c3c3cda..cbfbfff31dc3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/OperationsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight 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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateEndpointConnectionsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateEndpointConnectionsClient.java index 5a09c534325b..1cdbfe8c069d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateEndpointConnectionsClient.java @@ -23,7 +23,7 @@ public interface PrivateEndpointConnectionsClient { * @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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -37,7 +37,7 @@ public interface PrivateEndpointConnectionsClient { * @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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster( @@ -53,7 +53,7 @@ PagedIterable listByCluster( * @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 private endpoint connection. + * @return the {@link SyncPoller} for polling of the private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -73,7 +73,7 @@ SyncPoller, PrivateEndpointConnection * @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 private endpoint connection. + * @return the {@link SyncPoller} for polling of the private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -129,14 +129,15 @@ PrivateEndpointConnectionInner createOrUpdate( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specific private endpoint connection. + * @return the specific private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String resourceGroupName, String clusterName, String privateEndpointConnectionName); + Response getWithResponse( + String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); /** * Gets the specific private endpoint connection. @@ -144,15 +145,14 @@ PrivateEndpointConnectionInner get( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specific private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnectionInner get( + String resourceGroupName, String clusterName, String privateEndpointConnectionName); /** * Deletes the specific private endpoint connection. @@ -163,7 +163,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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -179,7 +179,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( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateLinkResourcesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateLinkResourcesClient.java index 9249f8c205dd..296d66bca064 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateLinkResourcesClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/PrivateLinkResourcesClient.java @@ -18,28 +18,28 @@ public interface PrivateLinkResourcesClient { * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private link resources. + * @return a list of private link resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner listByCluster(String resourceGroupName, String clusterName); + Response listByClusterWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Lists the private link resources in a HDInsight cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private link resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listByClusterWithResponse( - String resourceGroupName, String clusterName, Context context); + PrivateLinkResourceListResultInner listByCluster(String resourceGroupName, String clusterName); /** * Gets the specific private link resource. @@ -47,13 +47,15 @@ Response listByClusterWithResponse( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specific private link resource. + * @return the specific private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner get(String resourceGroupName, String clusterName, String privateLinkResourceName); + Response getWithResponse( + String resourceGroupName, String clusterName, String privateLinkResourceName, Context context); /** * Gets the specific private link resource. @@ -61,13 +63,11 @@ Response listByClusterWithResponse( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specific private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context); + PrivateLinkResourceInner get(String resourceGroupName, String clusterName, String privateLinkResourceName); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptActionsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptActionsClient.java index aae0bd3f15dc..366236759238 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptActionsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptActionsClient.java @@ -20,12 +20,14 @@ public interface ScriptActionsClient { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptName The name of the script. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String scriptName); + Response deleteWithResponse(String resourceGroupName, String clusterName, String scriptName, Context context); /** * Deletes a specified persisted script action of the cluster. @@ -33,14 +35,12 @@ public interface ScriptActionsClient { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptName The name of the script. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String clusterName, String scriptName, Context context); + void delete(String resourceGroupName, String clusterName, String scriptName); /** * Lists all the persisted script actions for the specified cluster. @@ -50,7 +50,7 @@ public interface ScriptActionsClient { * @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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -64,7 +64,7 @@ public interface ScriptActionsClient { * @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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster( @@ -76,14 +76,15 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the script execution detail for the given script execution ID. + * @return the script execution detail for the given script execution ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RuntimeScriptActionDetailInner getExecutionDetail( - String resourceGroupName, String clusterName, String scriptExecutionId); + Response getExecutionDetailWithResponse( + String resourceGroupName, String clusterName, String scriptExecutionId, Context context); /** * Gets the script execution detail for the given script execution ID. @@ -91,15 +92,14 @@ RuntimeScriptActionDetailInner getExecutionDetail( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the script execution detail for the given script execution ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getExecutionDetailWithResponse( - String resourceGroupName, String clusterName, String scriptExecutionId, Context context); + RuntimeScriptActionDetailInner getExecutionDetail( + String resourceGroupName, String clusterName, String scriptExecutionId); /** * Gets the async operation status of execution operation. @@ -107,14 +107,15 @@ Response getExecutionDetailWithResponse( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status of execution operation. + * @return the async operation status of execution operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationResultInner getExecutionAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId); + Response getExecutionAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context); /** * Gets the async operation status of execution operation. @@ -122,13 +123,12 @@ AsyncOperationResultInner getExecutionAsyncOperationStatus( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status of execution operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getExecutionAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context); + AsyncOperationResultInner getExecutionAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptExecutionHistoriesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptExecutionHistoriesClient.java index 32b50ec09c74..d57f4c3b48d8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptExecutionHistoriesClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ScriptExecutionHistoriesClient.java @@ -21,7 +21,7 @@ public interface ScriptExecutionHistoriesClient { * @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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -35,7 +35,7 @@ public interface ScriptExecutionHistoriesClient { * @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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCluster( @@ -47,12 +47,15 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void promote(String resourceGroupName, String clusterName, String scriptExecutionId); + Response promoteWithResponse( + String resourceGroupName, String clusterName, String scriptExecutionId, Context context); /** * Promotes the specified ad-hoc script execution to a persisted script. @@ -60,13 +63,10 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response promoteWithResponse( - String resourceGroupName, String clusterName, String scriptExecutionId, Context context); + void promote(String resourceGroupName, String clusterName, String scriptExecutionId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/VirtualMachinesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/VirtualMachinesClient.java index 9259519cb3d4..76fc3f0bb954 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/VirtualMachinesClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/VirtualMachinesClient.java @@ -21,27 +21,27 @@ public interface VirtualMachinesClient { * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of the request to list cluster hosts. + * @return result of the request to list cluster hosts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - List listHosts(String resourceGroupName, String clusterName); + Response> listHostsWithResponse(String resourceGroupName, String clusterName, Context context); /** * Lists the HDInsight clusters hosts. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of the request to list cluster hosts. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listHostsWithResponse(String resourceGroupName, String clusterName, Context context); + List listHosts(String resourceGroupName, String clusterName); /** * Restarts the specified HDInsight cluster hosts. @@ -52,7 +52,7 @@ public interface VirtualMachinesClient { * @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> beginRestartHosts( @@ -68,7 +68,7 @@ SyncPoller, Void> beginRestartHosts( * @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> beginRestartHosts( @@ -107,13 +107,15 @@ SyncPoller, Void> beginRestartHosts( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationResultInner getAsyncOperationStatus(String resourceGroupName, String clusterName, String operationId); + Response getAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context); /** * Gets the async operation status. @@ -121,13 +123,11 @@ SyncPoller, Void> beginRestartHosts( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context); + AsyncOperationResultInner getAsyncOperationStatus(String resourceGroupName, String clusterName, String operationId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ApplicationInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ApplicationInner.java index 6adcb2ebe5d1..473ac3878772 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ApplicationInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ApplicationInner.java @@ -7,9 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.ApplicationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -17,8 +15,6 @@ /** The HDInsight cluster application. */ @Fluent public final class ApplicationInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInner.class); - /* * The ETag for the application */ @@ -44,6 +40,10 @@ public final class ApplicationInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ApplicationInner class. */ + public ApplicationInner() { + } + /** * Get the etag property: The ETag for the application. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AsyncOperationResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AsyncOperationResultInner.java index 655309cabdc8..71df4165a92d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AsyncOperationResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AsyncOperationResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.AsyncOperationState; import com.azure.resourcemanager.hdinsight.models.Errors; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The azure async operation response. */ @Fluent public final class AsyncOperationResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AsyncOperationResultInner.class); - /* * The async operation state. */ @@ -28,6 +24,10 @@ public final class AsyncOperationResultInner { @JsonProperty(value = "error") private Errors error; + /** Creates an instance of AsyncOperationResultInner class. */ + public AsyncOperationResultInner() { + } + /** * Get the status property: The async operation state. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AzureMonitorResponseInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AzureMonitorResponseInner.java index 2384bd70e940..0d9582c3c46a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AzureMonitorResponseInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/AzureMonitorResponseInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.AzureMonitorSelectedConfigurations; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The azure monitor status response. */ @Fluent public final class AzureMonitorResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureMonitorResponseInner.class); - /* * The status of the monitor on the HDInsight cluster. */ @@ -33,6 +29,10 @@ public final class AzureMonitorResponseInner { @JsonProperty(value = "selectedConfigurations") private AzureMonitorSelectedConfigurations selectedConfigurations; + /** Creates an instance of AzureMonitorResponseInner class. */ + public AzureMonitorResponseInner() { + } + /** * Get the clusterMonitoringEnabled property: The status of the monitor on the HDInsight cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/BillingResponseListResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/BillingResponseListResultInner.java index fac3b5bc3405..a2cb481b2037 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/BillingResponseListResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/BillingResponseListResultInner.java @@ -5,19 +5,15 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.BillingResources; import com.azure.resourcemanager.hdinsight.models.VmSizeCompatibilityFilterV2; import com.azure.resourcemanager.hdinsight.models.VmSizeProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response for the operation to get regional billingSpecs for a subscription. */ @Fluent public final class BillingResponseListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingResponseListResultInner.class); - /* * The virtual machine sizes to include or exclude. */ @@ -31,8 +27,8 @@ public final class BillingResponseListResultInner { private List vmSizesWithEncryptionAtHost; /* - * The virtual machine filtering mode. Effectively this can enabling or - * disabling the virtual machine sizes in a particular set. + * The virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a + * particular set. */ @JsonProperty(value = "vmSizeFilters") private List vmSizeFilters; @@ -49,6 +45,10 @@ public final class BillingResponseListResultInner { @JsonProperty(value = "billingResources") private List billingResources; + /** Creates an instance of BillingResponseListResultInner class. */ + public BillingResponseListResultInner() { + } + /** * Get the vmSizes property: The virtual machine sizes to include or exclude. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/CapabilitiesResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/CapabilitiesResultInner.java index 9699d34bf062..e903b59bd5e5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/CapabilitiesResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/CapabilitiesResultInner.java @@ -5,11 +5,9 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.QuotaCapability; import com.azure.resourcemanager.hdinsight.models.RegionsCapability; import com.azure.resourcemanager.hdinsight.models.VersionsCapability; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -18,8 +16,6 @@ /** The Get Capabilities operation response. */ @Fluent public final class CapabilitiesResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilitiesResultInner.class); - /* * The version capability. */ @@ -46,6 +42,10 @@ public final class CapabilitiesResultInner { @JsonProperty(value = "quota", access = JsonProperty.Access.WRITE_ONLY) private QuotaCapability quota; + /** Creates an instance of CapabilitiesResultInner class. */ + public CapabilitiesResultInner() { + } + /** * Get the versions property: The version capability. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterConfigurationsInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterConfigurationsInner.java index 9d22a356559b..ff7c777c593f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterConfigurationsInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterConfigurationsInner.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.fluent.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,16 +12,17 @@ /** The configuration object for the specified cluster. */ @Fluent public final class ClusterConfigurationsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterConfigurationsInner.class); - /* - * The configuration object for the specified configuration for the - * specified cluster. + * The configuration object for the specified configuration for the specified cluster. */ @JsonProperty(value = "configurations") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map> configurations; + /** Creates an instance of ClusterConfigurationsInner class. */ + public ClusterConfigurationsInner() { + } + /** * Get the configurations property: The configuration object for the specified configuration for the specified * cluster. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterCreateValidationResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterCreateValidationResultInner.java index cd0b3494b2a6..265d6c09947d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterCreateValidationResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterCreateValidationResultInner.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.AaddsResourceDetails; import com.azure.resourcemanager.hdinsight.models.ValidationErrorInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.util.List; @@ -16,8 +14,6 @@ /** The response of cluster create request validation. */ @Fluent public final class ClusterCreateValidationResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterCreateValidationResultInner.class); - /* * The validation errors. */ @@ -42,6 +38,10 @@ public final class ClusterCreateValidationResultInner { @JsonProperty(value = "aaddsResourcesDetails") private List aaddsResourcesDetails; + /** Creates an instance of ClusterCreateValidationResultInner class. */ + public ClusterCreateValidationResultInner() { + } + /** * Get the validationErrors property: The validation errors. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterInner.java index 4045b0f0d7e8..ef981d3f8752 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterInner.java @@ -7,10 +7,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.ClusterGetProperties; import com.azure.resourcemanager.hdinsight.models.ClusterIdentity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -18,8 +16,6 @@ /** The HDInsight cluster. */ @Fluent public final class ClusterInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class); - /* * The ETag for the resource */ @@ -50,6 +46,10 @@ public final class ClusterInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ClusterInner class. */ + public ClusterInner() { + } + /** * Get the etag property: The ETag for the resource. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterMonitoringResponseInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterMonitoringResponseInner.java index 74bd3793c6fa..e5ee1c829539 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterMonitoringResponseInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/ClusterMonitoringResponseInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.fluent.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; /** The cluster monitoring status response. */ @Fluent public final class ClusterMonitoringResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterMonitoringResponseInner.class); - /* * The status of the monitor on the HDInsight cluster. */ @@ -26,6 +22,10 @@ public final class ClusterMonitoringResponseInner { @JsonProperty(value = "workspaceId") private String workspaceId; + /** Creates an instance of ClusterMonitoringResponseInner class. */ + public ClusterMonitoringResponseInner() { + } + /** * Get the clusterMonitoringEnabled property: The status of the monitor on the HDInsight cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/GatewaySettingsInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/GatewaySettingsInner.java index ff714f42f044..56662dde8a0c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/GatewaySettingsInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/GatewaySettingsInner.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.hdinsight.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; /** Gateway settings. */ @Immutable public final class GatewaySettingsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GatewaySettingsInner.class); - /* - * Indicates whether or not the gateway settings based authorization is - * enabled. + * Indicates whether or not the gateway settings based authorization is enabled. */ @JsonProperty(value = "restAuthCredential.isEnabled", access = JsonProperty.Access.WRITE_ONLY) private String isCredentialEnabled; @@ -33,6 +28,10 @@ public final class GatewaySettingsInner { @JsonProperty(value = "restAuthCredential.password", access = JsonProperty.Access.WRITE_ONLY) private String password; + /** Creates an instance of GatewaySettingsInner class. */ + public GatewaySettingsInner() { + } + /** * Get the isCredentialEnabled property: Indicates whether or not the gateway settings based authorization is * enabled. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/HostInfoInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/HostInfoInner.java index 21242672dae4..c6446cfc44cf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/HostInfoInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/HostInfoInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.fluent.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; /** The cluster host information. */ @Fluent public final class HostInfoInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HostInfoInner.class); - /* * The host name */ @@ -32,6 +28,10 @@ public final class HostInfoInner { @JsonProperty(value = "effectiveDiskEncryptionKeyUrl") private String effectiveDiskEncryptionKeyUrl; + /** Creates an instance of HostInfoInner class. */ + public HostInfoInner() { + } + /** * Get the name property: The host name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/IpConfigurationProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/IpConfigurationProperties.java index 0db1e1090365..01d4e2ce247b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/IpConfigurationProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/IpConfigurationProperties.java @@ -5,28 +5,22 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.PrivateIpAllocationMethod; import com.azure.resourcemanager.hdinsight.models.PrivateLinkConfigurationProvisioningState; import com.azure.resourcemanager.hdinsight.models.ResourceId; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The private link ip configuration properties. */ @Fluent public final class IpConfigurationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpConfigurationProperties.class); - /* - * The private link configuration provisioning state, which only appears in - * the response. + * The private link configuration provisioning state, which only appears in the response. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateLinkConfigurationProvisioningState provisioningState; /* - * Indicates whether this IP configuration is primary for the corresponding - * NIC. + * Indicates whether this IP configuration is primary for the corresponding NIC. */ @JsonProperty(value = "primary") private Boolean primary; @@ -49,6 +43,10 @@ public final class IpConfigurationProperties { @JsonProperty(value = "subnet") private ResourceId subnet; + /** Creates an instance of IpConfigurationProperties class. */ + public IpConfigurationProperties() { + } + /** * Get the provisioningState property: The private link configuration provisioning state, which only appears in the * response. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/NameAvailabilityCheckResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/NameAvailabilityCheckResultInner.java index ca7f073fea52..6da1498312cc 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/NameAvailabilityCheckResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/NameAvailabilityCheckResultInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.fluent.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; /** The response spec of checking name availability. */ @Fluent public final class NameAvailabilityCheckResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityCheckResultInner.class); - /* * This indicates whether the name is available. */ @@ -32,6 +28,10 @@ public final class NameAvailabilityCheckResultInner { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; + /** Creates an instance of NameAvailabilityCheckResultInner class. */ + public NameAvailabilityCheckResultInner() { + } + /** * Get the nameAvailable property: This indicates whether the name is available. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/OperationInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/OperationInner.java index ae76e0bacedf..3870890f2c5a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/OperationInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/OperationInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.OperationDisplay; import com.azure.resourcemanager.hdinsight.models.OperationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The HDInsight REST API operation. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * The operation name: {provider}/{resource}/{operation} */ @@ -34,6 +30,10 @@ public final class OperationInner { @JsonProperty(value = "properties") private OperationProperties properties; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: The operation name: {provider}/{resource}/{operation}. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionInner.java index 8aa63e645566..8ad9a6aeb494 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionInner.java @@ -11,14 +11,11 @@ import com.azure.resourcemanager.hdinsight.models.PrivateEndpoint; import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The private endpoint connection. */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); - /* * The private endpoint connection properties. */ @@ -31,6 +28,10 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of PrivateEndpointConnectionInner class. */ + public PrivateEndpointConnectionInner() { + } + /** * Get the innerProperties property: The private endpoint connection properties. * @@ -107,7 +108,7 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { */ public void validate() { if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model PrivateEndpointConnectionInner")); @@ -115,4 +116,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionInner.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionProperties.java index 80cb161ae029..6dcd186c558e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateEndpointConnectionProperties.java @@ -9,14 +9,11 @@ import com.azure.resourcemanager.hdinsight.models.PrivateEndpoint; import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The private endpoint connection properties. */ @Fluent public final class PrivateEndpointConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); - /* * The private endpoint of the private endpoint connection */ @@ -41,6 +38,10 @@ public final class PrivateEndpointConnectionProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointConnectionProvisioningState provisioningState; + /** Creates an instance of PrivateEndpointConnectionProperties class. */ + public PrivateEndpointConnectionProperties() { + } + /** * Get the privateEndpoint property: The private endpoint of the private endpoint connection. * @@ -99,7 +100,7 @@ public void validate() { privateEndpoint().validate(); } if (privateLinkServiceConnectionState() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property privateLinkServiceConnectionState in model" @@ -108,4 +109,6 @@ public void validate() { privateLinkServiceConnectionState().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkConfigurationProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkConfigurationProperties.java index f3bc2bd0208a..2faf6102dc55 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkConfigurationProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkConfigurationProperties.java @@ -8,25 +8,21 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.IpConfiguration; import com.azure.resourcemanager.hdinsight.models.PrivateLinkConfigurationProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The private link configuration properties. */ @Fluent public final class PrivateLinkConfigurationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkConfigurationProperties.class); - /* - * The HDInsight private linkable sub-resource name to apply the private - * link configuration to. For example, 'headnode', 'gateway', 'edgenode'. + * The HDInsight private linkable sub-resource name to apply the private link configuration to. For example, + * 'headnode', 'gateway', 'edgenode'. */ @JsonProperty(value = "groupId", required = true) private String groupId; /* - * The private link configuration provisioning state, which only appears in - * the response. + * The private link configuration provisioning state, which only appears in the response. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateLinkConfigurationProvisioningState provisioningState; @@ -37,6 +33,10 @@ public final class PrivateLinkConfigurationProperties { @JsonProperty(value = "ipConfigurations", required = true) private List ipConfigurations; + /** Creates an instance of PrivateLinkConfigurationProperties class. */ + public PrivateLinkConfigurationProperties() { + } + /** * Get the groupId property: The HDInsight private linkable sub-resource name to apply the private link * configuration to. For example, 'headnode', 'gateway', 'edgenode'. @@ -96,13 +96,13 @@ public PrivateLinkConfigurationProperties withIpConfigurations(List e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkConfigurationProperties.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceInner.java index fbc0cc81f698..07d08497f973 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A private link resource. */ @Fluent public final class PrivateLinkResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); - /* * Resource properties. */ @@ -29,6 +25,10 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of PrivateLinkResourceInner class. */ + public PrivateLinkResourceInner() { + } + /** * Get the innerProperties property: Resource properties. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceListResultInner.java index bf28aa5278ec..dc1cc8ceadc0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceListResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceListResultInner.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.hdinsight.fluent.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 list of private link resources. */ @Fluent public final class PrivateLinkResourceListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceListResultInner.class); - /* * Array of private link resources */ @JsonProperty(value = "value") private List value; + /** Creates an instance of PrivateLinkResourceListResultInner class. */ + public PrivateLinkResourceListResultInner() { + } + /** * Get the value property: Array of private link resources. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceProperties.java index 7e831e1e6568..eaed8b38d449 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/PrivateLinkResourceProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.fluent.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; /** Properties of a private link resource. */ @Fluent public final class PrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); - /* * The private link resource group id. */ @@ -33,6 +29,10 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; + /** Creates an instance of PrivateLinkResourceProperties class. */ + public PrivateLinkResourceProperties() { + } + /** * Get the groupId property: The private link resource group id. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/RuntimeScriptActionDetailInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/RuntimeScriptActionDetailInner.java index e7ccc8973cd2..c9287c1fc001 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/RuntimeScriptActionDetailInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/RuntimeScriptActionDetailInner.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction; import com.azure.resourcemanager.hdinsight.models.ScriptActionExecutionSummary; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The execution details of a script action. */ @Fluent public final class RuntimeScriptActionDetailInner extends RuntimeScriptAction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RuntimeScriptActionDetailInner.class); - /* * The execution id of the script action. */ @@ -59,6 +55,10 @@ public final class RuntimeScriptActionDetailInner extends RuntimeScriptAction { @JsonProperty(value = "debugInformation", access = JsonProperty.Access.WRITE_ONLY) private String debugInformation; + /** Creates an instance of RuntimeScriptActionDetailInner class. */ + public RuntimeScriptActionDetailInner() { + } + /** * Get the scriptExecutionId property: The execution id of the script action. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/UsagesListResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/UsagesListResultInner.java index f02f9989a95f..12dfaf346dee 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/UsagesListResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/models/UsagesListResultInner.java @@ -5,23 +5,23 @@ package com.azure.resourcemanager.hdinsight.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.models.Usage; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response for the operation to get regional usages for a subscription. */ @Fluent public final class UsagesListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsagesListResultInner.class); - /* * The list of usages. */ @JsonProperty(value = "value") private List value; + /** Creates an instance of UsagesListResultInner class. */ + public UsagesListResultInner() { + } + /** * Get the value property: The list of usages. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java index 36fc54930702..030f58c2c1c5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java @@ -29,7 +29,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.hdinsight.fluent.ApplicationsClient; @@ -42,8 +41,6 @@ /** An instance of this class provides access to all the operations defined in ApplicationsClient. */ public final class ApplicationsClientImpl implements ApplicationsClient { - private final ClientLogger logger = new ClientLogger(ApplicationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ApplicationsService service; @@ -168,7 +165,8 @@ Mono> listByClusterNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster Applications. + * @return result of the request to list cluster Applications along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -226,7 +224,8 @@ private Mono> listByClusterSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster Applications. + * @return result of the request to list cluster Applications along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -280,7 +279,7 @@ private Mono> listByClusterSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { @@ -298,7 +297,7 @@ private PagedFlux listByClusterAsync(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 result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync( @@ -316,7 +315,7 @@ private PagedFlux listByClusterAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster(String resourceGroupName, String clusterName) { @@ -332,7 +331,7 @@ public PagedIterable listByCluster(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 result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster( @@ -349,7 +348,8 @@ public PagedIterable listByCluster( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the specified application. + * @return properties of the specified application along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -404,7 +404,8 @@ 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 properties of the specified application. + * @return properties of the specified application along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -455,19 +456,12 @@ 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 properties of the specified application. + * @return properties of the specified application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String clusterName, String applicationName) { return getWithResponseAsync(resourceGroupName, clusterName, applicationName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -476,14 +470,16 @@ private Mono getAsync(String resourceGroupName, String cluster * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the specified application. + * @return properties of the specified application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner get(String resourceGroupName, String clusterName, String applicationName) { - return getAsync(resourceGroupName, clusterName, applicationName).block(); + public Response getWithResponse( + String resourceGroupName, String clusterName, String applicationName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, applicationName, context).block(); } /** @@ -492,16 +488,14 @@ public ApplicationInner get(String resourceGroupName, String clusterName, String * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties of the specified application. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String applicationName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, applicationName, context).block(); + public ApplicationInner get(String resourceGroupName, String clusterName, String applicationName) { + return getWithResponse(resourceGroupName, clusterName, applicationName, Context.NONE).getValue(); } /** @@ -514,7 +508,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 the HDInsight cluster application. + * @return the HDInsight cluster application along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -576,7 +570,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster application. + * @return the HDInsight cluster application along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -638,7 +632,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster application. + * @return the {@link PollerFlux} for polling of the HDInsight cluster application. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationInner> beginCreateAsync( @@ -648,7 +642,11 @@ private PollerFlux, ApplicationInner> beginCreateAs return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ApplicationInner.class, ApplicationInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + ApplicationInner.class, + ApplicationInner.class, + this.client.getContext()); } /** @@ -662,7 +660,7 @@ private PollerFlux, ApplicationInner> beginCreateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster application. + * @return the {@link PollerFlux} for polling of the HDInsight cluster application. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationInner> beginCreateAsync( @@ -690,7 +688,7 @@ private PollerFlux, ApplicationInner> beginCreateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster application. + * @return the {@link SyncPoller} for polling of the HDInsight cluster application. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationInner> beginCreate( @@ -709,7 +707,7 @@ public SyncPoller, ApplicationInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster application. + * @return the {@link SyncPoller} for polling of the HDInsight cluster application. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationInner> beginCreate( @@ -731,7 +729,7 @@ public SyncPoller, ApplicationInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster application. + * @return the HDInsight cluster application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -752,7 +750,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster application. + * @return the HDInsight cluster application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -816,7 +814,7 @@ public ApplicationInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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( @@ -871,7 +869,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( @@ -922,7 +920,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( @@ -931,7 +929,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, clusterName, applicationName); 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()); } /** @@ -944,7 +943,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( @@ -966,7 +965,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( @@ -984,7 +983,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( @@ -1001,7 +1000,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 clusterName, String applicationName) { @@ -1020,7 +1019,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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( @@ -1071,7 +1070,7 @@ public void delete(String resourceGroupName, String clusterName, String applicat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -1131,7 +1130,7 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -1187,21 +1186,14 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAzureAsyncOperationStatusAsync( String resourceGroupName, String clusterName, String applicationName, String operationId) { return getAzureAsyncOperationStatusWithResponseAsync( resourceGroupName, clusterName, applicationName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1211,15 +1203,18 @@ private Mono getAzureAsyncOperationStatusAsync( * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationResultInner getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String applicationName, String operationId) { - return getAzureAsyncOperationStatusAsync(resourceGroupName, clusterName, applicationName, operationId).block(); + public Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String applicationName, String operationId, Context context) { + return getAzureAsyncOperationStatusWithResponseAsync( + resourceGroupName, clusterName, applicationName, operationId, context) + .block(); } /** @@ -1229,28 +1224,29 @@ public AsyncOperationResultInner getAzureAsyncOperationStatus( * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String applicationName, String operationId, Context context) { - return getAzureAsyncOperationStatusWithResponseAsync( - resourceGroupName, clusterName, applicationName, operationId, context) - .block(); + public AsyncOperationResultInner getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String applicationName, String operationId) { + return getAzureAsyncOperationStatusWithResponse( + resourceGroupName, clusterName, applicationName, operationId, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster Applications. + * @return result of the request to list cluster Applications along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { @@ -1281,12 +1277,14 @@ private Mono> listByClusterNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster Applications. + * @return result of the request to list cluster Applications along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsImpl.java index d26a337f9312..91eb8e1c9465 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.hdinsight.models.Application; import com.azure.resourcemanager.hdinsight.models.Applications; import com.azure.resourcemanager.hdinsight.models.AsyncOperationResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ApplicationsImpl implements Applications { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ApplicationsImpl.class); private final ApplicationsClient innerClient; @@ -41,15 +40,6 @@ public PagedIterable listByCluster(String resourceGroupName, String return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } - public Application get(String resourceGroupName, String clusterName, String applicationName) { - ApplicationInner inner = this.serviceClient().get(resourceGroupName, clusterName, applicationName); - if (inner != null) { - return new ApplicationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String clusterName, String applicationName, Context context) { Response inner = @@ -65,6 +55,15 @@ public Response getWithResponse( } } + public Application get(String resourceGroupName, String clusterName, String applicationName) { + ApplicationInner inner = this.serviceClient().get(resourceGroupName, clusterName, applicationName); + if (inner != null) { + return new ApplicationImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String clusterName, String applicationName) { this.serviceClient().delete(resourceGroupName, clusterName, applicationName); } @@ -73,19 +72,6 @@ public void delete(String resourceGroupName, String clusterName, String applicat this.serviceClient().delete(resourceGroupName, clusterName, applicationName, context); } - public AsyncOperationResult getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String applicationName, String operationId) { - AsyncOperationResultInner inner = - this - .serviceClient() - .getAzureAsyncOperationStatus(resourceGroupName, clusterName, applicationName, operationId); - if (inner != null) { - return new AsyncOperationResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getAzureAsyncOperationStatusWithResponse( String resourceGroupName, String clusterName, String applicationName, String operationId, Context context) { Response inner = @@ -104,10 +90,23 @@ public Response getAzureAsyncOperationStatusWithResponse( } } + public AsyncOperationResult getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String applicationName, String operationId) { + AsyncOperationResultInner inner = + this + .serviceClient() + .getAzureAsyncOperationStatus(resourceGroupName, clusterName, applicationName, operationId); + if (inner != null) { + return new AsyncOperationResultImpl(inner, this.manager()); + } else { + return null; + } + } + public Application getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -115,14 +114,14 @@ public Application getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String applicationName = Utils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); @@ -133,7 +132,7 @@ public Application 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 @@ -141,14 +140,14 @@ public Response getByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String applicationName = Utils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); @@ -159,7 +158,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 @@ -167,14 +166,14 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String applicationName = Utils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); @@ -185,7 +184,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 @@ -193,14 +192,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String applicationName = Utils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClusterImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClusterImpl.java index 1d6a4b4534d4..7545095ec3f7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClusterImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClusterImpl.java @@ -87,6 +87,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ClusterInner innerModel() { return this.innerObject; } @@ -193,14 +197,14 @@ public void rotateDiskEncryptionKey(ClusterDiskEncryptionParameters parameters, serviceManager.clusters().rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, context); } - public GatewaySettings getGatewaySettings() { - return serviceManager.clusters().getGatewaySettings(resourceGroupName, clusterName); - } - public Response getGatewaySettingsWithResponse(Context context) { return serviceManager.clusters().getGatewaySettingsWithResponse(resourceGroupName, clusterName, context); } + public GatewaySettings getGatewaySettings() { + return serviceManager.clusters().getGatewaySettings(resourceGroupName, clusterName); + } + public void updateGatewaySettings(UpdateGatewaySettingsParameters parameters) { serviceManager.clusters().updateGatewaySettings(resourceGroupName, clusterName, parameters); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.java index 887cddbd7372..11fbc8812162 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.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.hdinsight.fluent.ClustersClient; @@ -54,8 +53,6 @@ /** An instance of this class provides access to all the operations defined in ClustersClient. */ public final class ClustersClientImpl implements ClustersClient { - private final ClientLogger logger = new ClientLogger(ClustersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ClustersService service; @@ -324,7 +321,7 @@ 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 the HDInsight cluster. + * @return the HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -380,7 +377,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -432,7 +429,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the {@link PollerFlux} for polling of the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginCreateAsync( @@ -441,7 +438,7 @@ private PollerFlux, ClusterInner> beginCreateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** @@ -454,7 +451,7 @@ private PollerFlux, ClusterInner> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the {@link PollerFlux} for polling of the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginCreateAsync( @@ -477,7 +474,7 @@ private PollerFlux, ClusterInner> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the {@link SyncPoller} for polling of the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreate( @@ -495,7 +492,7 @@ public SyncPoller, ClusterInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the {@link SyncPoller} for polling of the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreate( @@ -512,7 +509,7 @@ public SyncPoller, ClusterInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the HDInsight cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -532,7 +529,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the HDInsight cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -586,7 +583,7 @@ public ClusterInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 HDInsight cluster. + * @return the HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -642,7 +639,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 the HDInsight cluster. + * @return the HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -694,20 +691,13 @@ 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 the HDInsight cluster. + * @return the HDInsight cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String resourceGroupName, String clusterName, ClusterPatchParameters parameters) { return updateWithResponseAsync(resourceGroupName, clusterName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -716,14 +706,16 @@ private Mono updateAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param parameters The cluster patch request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the HDInsight cluster. + * @return the HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatchParameters parameters) { - return updateAsync(resourceGroupName, clusterName, parameters).block(); + public Response updateWithResponse( + String resourceGroupName, String clusterName, ClusterPatchParameters parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, clusterName, parameters, context).block(); } /** @@ -732,16 +724,14 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param parameters The cluster patch request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String clusterName, ClusterPatchParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, clusterName, parameters, context).block(); + public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatchParameters parameters) { + return updateWithResponse(resourceGroupName, clusterName, parameters, Context.NONE).getValue(); } /** @@ -752,7 +742,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusterName) { @@ -800,7 +790,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( @@ -845,14 +835,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 clusterName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); 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()); } /** @@ -864,7 +855,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( @@ -884,7 +875,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 clusterName) { @@ -900,7 +891,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( @@ -916,7 +907,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 clusterName) { @@ -932,7 +923,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 clusterName, Context context) { @@ -978,7 +969,7 @@ public void delete(String resourceGroupName, String clusterName, 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 specified cluster. + * @return the specified cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1027,7 +1018,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 the specified cluster. + * @return the specified cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1072,19 +1063,12 @@ 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 the specified cluster. + * @return the specified cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1092,14 +1076,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified cluster. + * @return the specified cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { - return getByResourceGroupAsync(resourceGroupName, clusterName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -1107,16 +1093,14 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -1126,7 +1110,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 List Cluster operation response. + * @return the List Cluster operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1178,7 +1163,8 @@ private Mono> listByResourceGroupSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 List Cluster operation response. + * @return the List Cluster operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1227,7 +1213,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 the List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1244,7 +1230,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1260,7 +1246,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1275,7 +1261,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 the List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1292,7 +1278,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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resizeWithResponseAsync( @@ -1353,7 +1339,7 @@ private Mono>> resizeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> resizeWithResponseAsync( @@ -1414,7 +1400,7 @@ private Mono>> resizeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginResizeAsync( @@ -1423,7 +1409,8 @@ private PollerFlux, Void> beginResizeAsync( resizeWithResponseAsync(resourceGroupName, clusterName, roleName, parameters); 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()); } /** @@ -1437,7 +1424,7 @@ private PollerFlux, Void> beginResizeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginResizeAsync( @@ -1464,7 +1451,7 @@ private PollerFlux, Void> beginResizeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginResize( @@ -1483,7 +1470,7 @@ public SyncPoller, Void> beginResize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginResize( @@ -1505,7 +1492,7 @@ public SyncPoller, Void> beginResize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resizeAsync( @@ -1526,7 +1513,7 @@ private Mono resizeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resizeAsync( @@ -1589,7 +1576,7 @@ public void resize( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> updateAutoScaleConfigurationWithResponseAsync( @@ -1653,7 +1640,7 @@ private Mono>> updateAutoScaleConfigurationWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> updateAutoScaleConfigurationWithResponseAsync( @@ -1714,7 +1701,7 @@ private Mono>> updateAutoScaleConfigurationWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateAutoScaleConfigurationAsync( @@ -1726,7 +1713,8 @@ private PollerFlux, Void> beginUpdateAutoScaleConfigurationAsyn updateAutoScaleConfigurationWithResponseAsync(resourceGroupName, clusterName, roleName, parameters); 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()); } /** @@ -1740,7 +1728,7 @@ private PollerFlux, Void> beginUpdateAutoScaleConfigurationAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateAutoScaleConfigurationAsync( @@ -1768,7 +1756,7 @@ private PollerFlux, Void> beginUpdateAutoScaleConfigurationAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateAutoScaleConfiguration( @@ -1791,7 +1779,7 @@ public SyncPoller, Void> beginUpdateAutoScaleConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateAutoScaleConfiguration( @@ -1814,7 +1802,7 @@ public SyncPoller, Void> beginUpdateAutoScaleConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 updateAutoScaleConfigurationAsync( @@ -1838,7 +1826,7 @@ private Mono updateAutoScaleConfigurationAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 updateAutoScaleConfigurationAsync( @@ -1899,7 +1887,8 @@ public void updateAutoScaleConfiguration( * * @throws 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 List Cluster operation response. + * @return the List Cluster operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1945,7 +1934,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 the List Cluster operation response. + * @return the List Cluster operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1986,7 +1976,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 the List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -2000,7 +1990,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 the List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -2013,7 +2003,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 the List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -2027,7 +2017,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 the List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -2043,7 +2033,7 @@ 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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rotateDiskEncryptionKeyWithResponseAsync( @@ -2099,7 +2089,7 @@ private Mono>> rotateDiskEncryptionKeyWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> rotateDiskEncryptionKeyWithResponseAsync( @@ -2151,7 +2141,7 @@ private Mono>> rotateDiskEncryptionKeyWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRotateDiskEncryptionKeyAsync( @@ -2160,7 +2150,8 @@ private PollerFlux, Void> beginRotateDiskEncryptionKeyAsync( rotateDiskEncryptionKeyWithResponseAsync(resourceGroupName, clusterName, parameters); 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()); } /** @@ -2173,7 +2164,7 @@ private PollerFlux, Void> beginRotateDiskEncryptionKeyAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRotateDiskEncryptionKeyAsync( @@ -2195,7 +2186,7 @@ private PollerFlux, Void> beginRotateDiskEncryptionKeyAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRotateDiskEncryptionKey( @@ -2213,7 +2204,7 @@ public SyncPoller, Void> beginRotateDiskEncryptionKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRotateDiskEncryptionKey( @@ -2230,7 +2221,7 @@ public SyncPoller, Void> beginRotateDiskEncryptionKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 rotateDiskEncryptionKeyAsync( @@ -2250,7 +2241,7 @@ private Mono rotateDiskEncryptionKeyAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 rotateDiskEncryptionKeyAsync( @@ -2301,7 +2292,8 @@ public void rotateDiskEncryptionKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gateway settings for the specified cluster. + * @return the gateway settings for the specified cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getGatewaySettingsWithResponseAsync( @@ -2350,7 +2342,8 @@ private Mono> getGatewaySettingsWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gateway settings for the specified cluster. + * @return the gateway settings for the specified cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getGatewaySettingsWithResponseAsync( @@ -2395,19 +2388,12 @@ private Mono> getGatewaySettingsWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gateway settings for the specified cluster. + * @return the gateway settings for the specified cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getGatewaySettingsAsync(String resourceGroupName, String clusterName) { return getGatewaySettingsWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2415,14 +2401,16 @@ private Mono getGatewaySettingsAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the gateway settings for the specified cluster. + * @return the gateway settings for the specified cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GatewaySettingsInner getGatewaySettings(String resourceGroupName, String clusterName) { - return getGatewaySettingsAsync(resourceGroupName, clusterName).block(); + public Response getGatewaySettingsWithResponse( + String resourceGroupName, String clusterName, Context context) { + return getGatewaySettingsWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -2430,16 +2418,14 @@ public GatewaySettingsInner getGatewaySettings(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the gateway settings for the specified cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getGatewaySettingsWithResponse( - String resourceGroupName, String clusterName, Context context) { - return getGatewaySettingsWithResponseAsync(resourceGroupName, clusterName, context).block(); + public GatewaySettingsInner getGatewaySettings(String resourceGroupName, String clusterName) { + return getGatewaySettingsWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -2451,7 +2437,7 @@ public Response getGatewaySettingsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> updateGatewaySettingsWithResponseAsync( @@ -2507,7 +2493,7 @@ private Mono>> updateGatewaySettingsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> updateGatewaySettingsWithResponseAsync( @@ -2559,7 +2545,7 @@ private Mono>> updateGatewaySettingsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateGatewaySettingsAsync( @@ -2568,7 +2554,8 @@ private PollerFlux, Void> beginUpdateGatewaySettingsAsync( updateGatewaySettingsWithResponseAsync(resourceGroupName, clusterName, parameters); 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()); } /** @@ -2581,7 +2568,7 @@ private PollerFlux, Void> beginUpdateGatewaySettingsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateGatewaySettingsAsync( @@ -2603,7 +2590,7 @@ private PollerFlux, Void> beginUpdateGatewaySettingsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateGatewaySettings( @@ -2621,7 +2608,7 @@ public SyncPoller, Void> beginUpdateGatewaySettings( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateGatewaySettings( @@ -2638,7 +2625,7 @@ public SyncPoller, Void> beginUpdateGatewaySettings( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 updateGatewaySettingsAsync( @@ -2658,7 +2645,7 @@ private Mono updateGatewaySettingsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 updateGatewaySettingsAsync( @@ -2710,7 +2697,7 @@ public void updateGatewaySettings( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 azure async operation response. + * @return the azure async operation response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -2764,7 +2751,7 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 azure async operation response. + * @return the azure async operation response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -2814,20 +2801,13 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 azure async operation response. + * @return the azure async operation response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAzureAsyncOperationStatusAsync( String resourceGroupName, String clusterName, String operationId) { return getAzureAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2836,15 +2816,17 @@ private Mono getAzureAsyncOperationStatusAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the azure async operation response. + * @return the azure async operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationResultInner getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId) { - return getAzureAsyncOperationStatusAsync(resourceGroupName, clusterName, operationId).block(); + public Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context) { + return getAzureAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId, context) + .block(); } /** @@ -2853,17 +2835,16 @@ public AsyncOperationResultInner getAzureAsyncOperationStatus( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the azure async operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context) { - return getAzureAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId, context) - .block(); + public AsyncOperationResultInner getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId) { + return getAzureAsyncOperationStatusWithResponse(resourceGroupName, clusterName, operationId, Context.NONE) + .getValue(); } /** @@ -2875,7 +2856,7 @@ public Response getAzureAsyncOperationStatusWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> updateIdentityCertificateWithResponseAsync( @@ -2931,7 +2912,7 @@ private Mono>> updateIdentityCertificateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> updateIdentityCertificateWithResponseAsync( @@ -2986,7 +2967,7 @@ private Mono>> updateIdentityCertificateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateIdentityCertificateAsync( @@ -2995,7 +2976,8 @@ private PollerFlux, Void> beginUpdateIdentityCertificateAsync( updateIdentityCertificateWithResponseAsync(resourceGroupName, clusterName, parameters); 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()); } /** @@ -3008,7 +2990,7 @@ private PollerFlux, Void> beginUpdateIdentityCertificateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateIdentityCertificateAsync( @@ -3033,7 +3015,7 @@ private PollerFlux, Void> beginUpdateIdentityCertificateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateIdentityCertificate( @@ -3051,7 +3033,7 @@ public SyncPoller, Void> beginUpdateIdentityCertificate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginUpdateIdentityCertificate( @@ -3071,7 +3053,7 @@ public SyncPoller, Void> beginUpdateIdentityCertificate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 updateIdentityCertificateAsync( @@ -3091,7 +3073,7 @@ private Mono updateIdentityCertificateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 updateIdentityCertificateAsync( @@ -3149,7 +3131,7 @@ public void updateIdentityCertificate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> executeScriptActionsWithResponseAsync( @@ -3205,7 +3187,7 @@ private Mono>> executeScriptActionsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> executeScriptActionsWithResponseAsync( @@ -3257,7 +3239,7 @@ private Mono>> executeScriptActionsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginExecuteScriptActionsAsync( @@ -3266,7 +3248,8 @@ private PollerFlux, Void> beginExecuteScriptActionsAsync( executeScriptActionsWithResponseAsync(resourceGroupName, clusterName, parameters); 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()); } /** @@ -3279,7 +3262,7 @@ private PollerFlux, Void> beginExecuteScriptActionsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginExecuteScriptActionsAsync( @@ -3301,7 +3284,7 @@ private PollerFlux, Void> beginExecuteScriptActionsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginExecuteScriptActions( @@ -3319,7 +3302,7 @@ public SyncPoller, Void> beginExecuteScriptActions( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginExecuteScriptActions( @@ -3336,7 +3319,7 @@ public SyncPoller, Void> beginExecuteScriptActions( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 executeScriptActionsAsync( @@ -3356,7 +3339,7 @@ private Mono executeScriptActionsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 executeScriptActionsAsync( @@ -3402,11 +3385,13 @@ public void executeScriptActions( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster operation response. + * @return the List Cluster operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -3438,12 +3423,14 @@ private Mono> listByResourceGroupNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster operation response. + * @return the List Cluster operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -3474,11 +3461,13 @@ private Mono> listByResourceGroupNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 List Cluster operation response. + * @return the List Cluster operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -3509,12 +3498,14 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster operation response. + * @return the List Cluster 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/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersImpl.java index 3bdd449dab51..695dae3fb263 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersImpl.java @@ -24,10 +24,9 @@ import com.azure.resourcemanager.hdinsight.models.RoleName; import com.azure.resourcemanager.hdinsight.models.UpdateClusterIdentityCertificateParameters; import com.azure.resourcemanager.hdinsight.models.UpdateGatewaySettingsParameters; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ClustersImpl implements Clusters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClustersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); private final ClustersClient innerClient; @@ -47,15 +46,6 @@ public void delete(String resourceGroupName, String clusterName, Context context this.serviceClient().delete(resourceGroupName, clusterName, context); } - public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { - ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String clusterName, Context context) { Response inner = @@ -71,6 +61,15 @@ public Response getByResourceGroupWithResponse( } } + public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { + ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); @@ -134,15 +133,6 @@ public void rotateDiskEncryptionKey( this.serviceClient().rotateDiskEncryptionKey(resourceGroupName, clusterName, parameters, context); } - public GatewaySettings getGatewaySettings(String resourceGroupName, String clusterName) { - GatewaySettingsInner inner = this.serviceClient().getGatewaySettings(resourceGroupName, clusterName); - if (inner != null) { - return new GatewaySettingsImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getGatewaySettingsWithResponse( String resourceGroupName, String clusterName, Context context) { Response inner = @@ -158,6 +148,15 @@ public Response getGatewaySettingsWithResponse( } } + public GatewaySettings getGatewaySettings(String resourceGroupName, String clusterName) { + GatewaySettingsInner inner = this.serviceClient().getGatewaySettings(resourceGroupName, clusterName); + if (inner != null) { + return new GatewaySettingsImpl(inner, this.manager()); + } else { + return null; + } + } + public void updateGatewaySettings( String resourceGroupName, String clusterName, UpdateGatewaySettingsParameters parameters) { this.serviceClient().updateGatewaySettings(resourceGroupName, clusterName, parameters); @@ -168,17 +167,6 @@ public void updateGatewaySettings( this.serviceClient().updateGatewaySettings(resourceGroupName, clusterName, parameters, context); } - public AsyncOperationResult getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId) { - AsyncOperationResultInner inner = - this.serviceClient().getAzureAsyncOperationStatus(resourceGroupName, clusterName, operationId); - if (inner != null) { - return new AsyncOperationResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getAzureAsyncOperationStatusWithResponse( String resourceGroupName, String clusterName, String operationId, Context context) { Response inner = @@ -196,6 +184,17 @@ public Response getAzureAsyncOperationStatusWithResponse( } } + public AsyncOperationResult getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId) { + AsyncOperationResultInner inner = + this.serviceClient().getAzureAsyncOperationStatus(resourceGroupName, clusterName, operationId); + if (inner != null) { + return new AsyncOperationResultImpl(inner, this.manager()); + } else { + return null; + } + } + public void updateIdentityCertificate( String resourceGroupName, String clusterName, UpdateClusterIdentityCertificateParameters parameters) { this.serviceClient().updateIdentityCertificate(resourceGroupName, clusterName, parameters); @@ -222,7 +221,7 @@ public void executeScriptActions( public Cluster getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -230,7 +229,7 @@ public Cluster getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -241,7 +240,7 @@ public Cluster 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 @@ -249,7 +248,7 @@ public Response getByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -260,7 +259,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 @@ -268,7 +267,7 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -279,7 +278,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 @@ -287,7 +286,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java index 2c71b26cae1a..9516e0ff56f9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java @@ -24,7 +24,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.hdinsight.fluent.ConfigurationsClient; @@ -36,8 +35,6 @@ /** An instance of this class provides access to all the operations defined in ConfigurationsClient. */ public final class ConfigurationsClientImpl implements ConfigurationsClient { - private final ClientLogger logger = new ClientLogger(ConfigurationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ConfigurationsService service; @@ -119,7 +116,8 @@ Mono>> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all configuration information for an HDI cluster. + * @return all configuration information for an HDI cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -168,7 +166,8 @@ private Mono> listWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all configuration information for an HDI cluster. + * @return all configuration information for an HDI cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -213,19 +212,11 @@ private Mono> listWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all configuration information for an HDI cluster. + * @return all configuration information for an HDI cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String clusterName) { - return listWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync(resourceGroupName, clusterName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -233,14 +224,16 @@ private Mono listAsync(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all configuration information for an HDI cluster. + * @return all configuration information for an HDI cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterConfigurationsInner list(String resourceGroupName, String clusterName) { - return listAsync(resourceGroupName, clusterName).block(); + public Response listWithResponse( + String resourceGroupName, String clusterName, Context context) { + return listWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -248,16 +241,14 @@ public ClusterConfigurationsInner list(String resourceGroupName, String clusterN * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all configuration information for an HDI cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String clusterName, Context context) { - return listWithResponseAsync(resourceGroupName, clusterName, context).block(); + public ClusterConfigurationsInner list(String resourceGroupName, String clusterName) { + return listWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -271,7 +262,7 @@ public Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> updateWithResponseAsync( @@ -332,7 +323,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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -393,7 +384,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 the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUpdateAsync( @@ -402,7 +393,8 @@ private PollerFlux, Void> beginUpdateAsync( updateWithResponseAsync(resourceGroupName, clusterName, configurationName, parameters); 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()); } /** @@ -417,7 +409,7 @@ private PollerFlux, Void> 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 the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUpdateAsync( @@ -445,7 +437,7 @@ private PollerFlux, Void> 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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpdate( @@ -465,7 +457,7 @@ public SyncPoller, Void> 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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpdate( @@ -488,7 +480,7 @@ public SyncPoller, Void> 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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -510,7 +502,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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -575,7 +567,8 @@ public void 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 configuration object for the specified configuration for the specified cluster. + * @return the configuration object for the specified configuration for the specified cluster along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> getWithResponseAsync( @@ -631,7 +624,8 @@ 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 the configuration object for the specified configuration for the specified cluster. + * @return the configuration object for the specified configuration for the specified cluster along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> getWithResponseAsync( @@ -683,19 +677,13 @@ 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 the configuration object for the specified configuration for the specified cluster. + * @return the configuration object for the specified configuration for the specified cluster on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAsync(String resourceGroupName, String clusterName, String configurationName) { return getWithResponseAsync(resourceGroupName, clusterName, configurationName) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -705,14 +693,17 @@ private Mono> getAsync(String resourceGroupName, String clus * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configuration object for the specified configuration for the specified cluster. + * @return the configuration object for the specified configuration for the specified cluster along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Map get(String resourceGroupName, String clusterName, String configurationName) { - return getAsync(resourceGroupName, clusterName, configurationName).block(); + public Response> getWithResponse( + String resourceGroupName, String clusterName, String configurationName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, configurationName, context).block(); } /** @@ -722,15 +713,13 @@ public Map get(String resourceGroupName, String clusterName, Str * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration object for the specified configuration for the specified cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, configurationName, context).block(); + public Map get(String resourceGroupName, String clusterName, String configurationName) { + return getWithResponse(resourceGroupName, clusterName, configurationName, Context.NONE).getValue(); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsImpl.java index d076448e9df2..32658703e27d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsImpl.java @@ -12,12 +12,11 @@ import com.azure.resourcemanager.hdinsight.fluent.models.ClusterConfigurationsInner; import com.azure.resourcemanager.hdinsight.models.ClusterConfigurations; import com.azure.resourcemanager.hdinsight.models.Configurations; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.Collections; import java.util.Map; public final class ConfigurationsImpl implements Configurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ConfigurationsImpl.class); private final ConfigurationsClient innerClient; @@ -29,15 +28,6 @@ public ConfigurationsImpl( this.serviceManager = serviceManager; } - public ClusterConfigurations list(String resourceGroupName, String clusterName) { - ClusterConfigurationsInner inner = this.serviceClient().list(resourceGroupName, clusterName); - if (inner != null) { - return new ClusterConfigurationsImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String clusterName, Context context) { Response inner = @@ -53,6 +43,15 @@ public Response listWithResponse( } } + public ClusterConfigurations list(String resourceGroupName, String clusterName) { + ClusterConfigurationsInner inner = this.serviceClient().list(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterConfigurationsImpl(inner, this.manager()); + } else { + return null; + } + } + public void update( String resourceGroupName, String clusterName, String configurationName, Map parameters) { this.serviceClient().update(resourceGroupName, clusterName, configurationName, parameters); @@ -67,6 +66,11 @@ public void update( this.serviceClient().update(resourceGroupName, clusterName, configurationName, parameters, context); } + public Response> getWithResponse( + String resourceGroupName, String clusterName, String configurationName, Context context) { + return this.serviceClient().getWithResponse(resourceGroupName, clusterName, configurationName, context); + } + public Map get(String resourceGroupName, String clusterName, String configurationName) { Map inner = this.serviceClient().get(resourceGroupName, clusterName, configurationName); if (inner != null) { @@ -76,11 +80,6 @@ public Map get(String resourceGroupName, String clusterName, Str } } - public Response> getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context) { - return this.serviceClient().getWithResponse(resourceGroupName, clusterName, configurationName, context); - } - private ConfigurationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java index f924f3a765d7..9b700f6af163 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java @@ -25,7 +25,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.hdinsight.fluent.ExtensionsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in ExtensionsClient. */ public final class ExtensionsClientImpl implements ExtensionsClient { - private final ClientLogger logger = new ClientLogger(ExtensionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ExtensionsService service; @@ -235,7 +232,7 @@ Mono> getAzureAsyncOperationStatus( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> enableMonitoringWithResponseAsync( @@ -291,7 +288,7 @@ private Mono>> enableMonitoringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> enableMonitoringWithResponseAsync( @@ -343,7 +340,7 @@ private Mono>> enableMonitoringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableMonitoringAsync( @@ -352,7 +349,8 @@ private PollerFlux, Void> beginEnableMonitoringAsync( enableMonitoringWithResponseAsync(resourceGroupName, clusterName, parameters); 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()); } /** @@ -365,7 +363,7 @@ private PollerFlux, Void> beginEnableMonitoringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableMonitoringAsync( @@ -387,7 +385,7 @@ private PollerFlux, Void> beginEnableMonitoringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableMonitoring( @@ -405,7 +403,7 @@ public SyncPoller, Void> beginEnableMonitoring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableMonitoring( @@ -422,7 +420,7 @@ public SyncPoller, Void> beginEnableMonitoring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 enableMonitoringAsync( @@ -442,7 +440,7 @@ private Mono enableMonitoringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 enableMonitoringAsync( @@ -492,7 +490,8 @@ public void enableMonitoring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Operations Management Suite (OMS) on the HDInsight cluster. + * @return the status of Operations Management Suite (OMS) on the HDInsight cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getMonitoringStatusWithResponseAsync( @@ -541,7 +540,8 @@ private Mono> getMonitoringStatusWithRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Operations Management Suite (OMS) on the HDInsight cluster. + * @return the status of Operations Management Suite (OMS) on the HDInsight cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getMonitoringStatusWithResponseAsync( @@ -586,20 +586,14 @@ private Mono> getMonitoringStatusWithRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Operations Management Suite (OMS) on the HDInsight cluster. + * @return the status of Operations Management Suite (OMS) on the HDInsight cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getMonitoringStatusAsync( String resourceGroupName, String clusterName) { return getMonitoringStatusWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -607,14 +601,16 @@ private Mono getMonitoringStatusAsync( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of Operations Management Suite (OMS) on the HDInsight cluster. + * @return the status of Operations Management Suite (OMS) on the HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterMonitoringResponseInner getMonitoringStatus(String resourceGroupName, String clusterName) { - return getMonitoringStatusAsync(resourceGroupName, clusterName).block(); + public Response getMonitoringStatusWithResponse( + String resourceGroupName, String clusterName, Context context) { + return getMonitoringStatusWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -622,16 +618,14 @@ public ClusterMonitoringResponseInner getMonitoringStatus(String resourceGroupNa * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the status of Operations Management Suite (OMS) on the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMonitoringStatusWithResponse( - String resourceGroupName, String clusterName, Context context) { - return getMonitoringStatusWithResponseAsync(resourceGroupName, clusterName, context).block(); + public ClusterMonitoringResponseInner getMonitoringStatus(String resourceGroupName, String clusterName) { + return getMonitoringStatusWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -642,7 +636,7 @@ public Response getMonitoringStatusWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> disableMonitoringWithResponseAsync( @@ -691,7 +685,7 @@ private Mono>> disableMonitoringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> disableMonitoringWithResponseAsync( @@ -736,7 +730,7 @@ private Mono>> disableMonitoringWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginDisableMonitoringAsync( @@ -744,7 +738,8 @@ private PollerFlux, Void> beginDisableMonitoringAsync( Mono>> mono = disableMonitoringWithResponseAsync(resourceGroupName, clusterName); 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()); } /** @@ -756,7 +751,7 @@ private PollerFlux, Void> beginDisableMonitoringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginDisableMonitoringAsync( @@ -777,7 +772,7 @@ private PollerFlux, Void> beginDisableMonitoringAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginDisableMonitoring(String resourceGroupName, String clusterName) { @@ -793,7 +788,7 @@ public SyncPoller, Void> beginDisableMonitoring(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 SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDisableMonitoring( @@ -809,7 +804,7 @@ public SyncPoller, Void> beginDisableMonitoring( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 disableMonitoringAsync(String resourceGroupName, String clusterName) { @@ -827,7 +822,7 @@ private Mono disableMonitoringAsync(String resourceGroupName, String clust * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 disableMonitoringAsync(String resourceGroupName, String clusterName, Context context) { @@ -874,7 +869,7 @@ public void disableMonitoring(String resourceGroupName, String clusterName, 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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> enableAzureMonitorWithResponseAsync( @@ -930,7 +925,7 @@ private Mono>> enableAzureMonitorWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> enableAzureMonitorWithResponseAsync( @@ -982,7 +977,7 @@ private Mono>> enableAzureMonitorWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableAzureMonitorAsync( @@ -991,7 +986,8 @@ private PollerFlux, Void> beginEnableAzureMonitorAsync( enableAzureMonitorWithResponseAsync(resourceGroupName, clusterName, parameters); 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()); } /** @@ -1004,7 +1000,7 @@ private PollerFlux, Void> beginEnableAzureMonitorAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableAzureMonitorAsync( @@ -1026,7 +1022,7 @@ private PollerFlux, Void> beginEnableAzureMonitorAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableAzureMonitor( @@ -1044,7 +1040,7 @@ public SyncPoller, Void> beginEnableAzureMonitor( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginEnableAzureMonitor( @@ -1061,7 +1057,7 @@ public SyncPoller, Void> beginEnableAzureMonitor( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 enableAzureMonitorAsync( @@ -1081,7 +1077,7 @@ private Mono enableAzureMonitorAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 enableAzureMonitorAsync( @@ -1131,7 +1127,8 @@ public void enableAzureMonitor( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Azure Monitor on the HDInsight cluster. + * @return the status of Azure Monitor on the HDInsight cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureMonitorStatusWithResponseAsync( @@ -1180,7 +1177,8 @@ private Mono> getAzureMonitorStatusWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Azure Monitor on the HDInsight cluster. + * @return the status of Azure Monitor on the HDInsight cluster along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureMonitorStatusWithResponseAsync( @@ -1225,19 +1223,12 @@ private Mono> getAzureMonitorStatusWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Azure Monitor on the HDInsight cluster. + * @return the status of Azure Monitor on the HDInsight cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAzureMonitorStatusAsync(String resourceGroupName, String clusterName) { return getAzureMonitorStatusWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1245,14 +1236,16 @@ private Mono getAzureMonitorStatusAsync(String resour * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of Azure Monitor on the HDInsight cluster. + * @return the status of Azure Monitor on the HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AzureMonitorResponseInner getAzureMonitorStatus(String resourceGroupName, String clusterName) { - return getAzureMonitorStatusAsync(resourceGroupName, clusterName).block(); + public Response getAzureMonitorStatusWithResponse( + String resourceGroupName, String clusterName, Context context) { + return getAzureMonitorStatusWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -1260,16 +1253,14 @@ public AzureMonitorResponseInner getAzureMonitorStatus(String resourceGroupName, * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the status of Azure Monitor on the HDInsight cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAzureMonitorStatusWithResponse( - String resourceGroupName, String clusterName, Context context) { - return getAzureMonitorStatusWithResponseAsync(resourceGroupName, clusterName, context).block(); + public AzureMonitorResponseInner getAzureMonitorStatus(String resourceGroupName, String clusterName) { + return getAzureMonitorStatusWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -1280,7 +1271,7 @@ public Response getAzureMonitorStatusWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> disableAzureMonitorWithResponseAsync( @@ -1329,7 +1320,7 @@ private Mono>> disableAzureMonitorWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> disableAzureMonitorWithResponseAsync( @@ -1374,7 +1365,7 @@ private Mono>> disableAzureMonitorWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginDisableAzureMonitorAsync( @@ -1382,7 +1373,8 @@ private PollerFlux, Void> beginDisableAzureMonitorAsync( Mono>> mono = disableAzureMonitorWithResponseAsync(resourceGroupName, clusterName); 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()); } /** @@ -1394,7 +1386,7 @@ private PollerFlux, Void> beginDisableAzureMonitorAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginDisableAzureMonitorAsync( @@ -1415,7 +1407,7 @@ private PollerFlux, Void> beginDisableAzureMonitorAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginDisableAzureMonitor(String resourceGroupName, String clusterName) { @@ -1431,7 +1423,7 @@ public SyncPoller, Void> beginDisableAzureMonitor(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginDisableAzureMonitor( @@ -1447,7 +1439,7 @@ public SyncPoller, Void> beginDisableAzureMonitor( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 disableAzureMonitorAsync(String resourceGroupName, String clusterName) { @@ -1465,7 +1457,7 @@ private Mono disableAzureMonitorAsync(String resourceGroupName, String clu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 disableAzureMonitorAsync(String resourceGroupName, String clusterName, Context context) { @@ -1513,7 +1505,7 @@ public void disableAzureMonitor(String resourceGroupName, String clusterName, 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>> createWithResponseAsync( @@ -1574,7 +1566,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> createWithResponseAsync( @@ -1631,7 +1623,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginCreateAsync( @@ -1640,7 +1632,8 @@ private PollerFlux, Void> beginCreateAsync( createWithResponseAsync(resourceGroupName, clusterName, extensionName, parameters); 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()); } /** @@ -1654,7 +1647,7 @@ private PollerFlux, Void> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginCreateAsync( @@ -1677,7 +1670,7 @@ private PollerFlux, Void> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginCreate( @@ -1696,7 +1689,7 @@ public SyncPoller, Void> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginCreate( @@ -1714,7 +1707,7 @@ public SyncPoller, Void> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 createAsync( @@ -1735,7 +1728,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 createAsync( @@ -1788,7 +1781,8 @@ public void create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 extension properties for the specified HDInsight cluster extension. + * @return the extension properties for the specified HDInsight cluster extension along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1842,7 +1836,8 @@ 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 the extension properties for the specified HDInsight cluster extension. + * @return the extension properties for the specified HDInsight cluster extension along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1892,20 +1887,14 @@ 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 the extension properties for the specified HDInsight cluster extension. + * @return the extension properties for the specified HDInsight cluster extension on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String clusterName, String extensionName) { return getWithResponseAsync(resourceGroupName, clusterName, extensionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1914,14 +1903,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the extension properties for the specified HDInsight cluster extension. + * @return the extension properties for the specified HDInsight cluster extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterMonitoringResponseInner get(String resourceGroupName, String clusterName, String extensionName) { - return getAsync(resourceGroupName, clusterName, extensionName).block(); + public Response getWithResponse( + String resourceGroupName, String clusterName, String extensionName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, extensionName, context).block(); } /** @@ -1930,16 +1921,14 @@ public ClusterMonitoringResponseInner get(String resourceGroupName, String clust * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the extension properties for the specified HDInsight cluster extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String extensionName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, extensionName, context).block(); + public ClusterMonitoringResponseInner get(String resourceGroupName, String clusterName, String extensionName) { + return getWithResponse(resourceGroupName, clusterName, extensionName, Context.NONE).getValue(); } /** @@ -1951,7 +1940,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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -2005,7 +1994,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( @@ -2055,7 +2044,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( @@ -2063,7 +2052,8 @@ private PollerFlux, Void> beginDeleteAsync( Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, extensionName); 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()); } /** @@ -2076,7 +2066,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( @@ -2098,7 +2088,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( @@ -2116,7 +2106,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( @@ -2133,7 +2123,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 clusterName, String extensionName) { @@ -2152,7 +2142,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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( @@ -2203,7 +2193,7 @@ public void delete(String resourceGroupName, String clusterName, String extensio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -2262,7 +2252,7 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -2317,20 +2307,13 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAzureAsyncOperationStatusAsync( String resourceGroupName, String clusterName, String extensionName, String operationId) { return getAzureAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, extensionName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2340,15 +2323,18 @@ private Mono getAzureAsyncOperationStatusAsync( * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationResultInner getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String extensionName, String operationId) { - return getAzureAsyncOperationStatusAsync(resourceGroupName, clusterName, extensionName, operationId).block(); + public Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String extensionName, String operationId, Context context) { + return getAzureAsyncOperationStatusWithResponseAsync( + resourceGroupName, clusterName, extensionName, operationId, context) + .block(); } /** @@ -2358,17 +2344,16 @@ public AsyncOperationResultInner getAzureAsyncOperationStatus( * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String extensionName, String operationId, Context context) { - return getAzureAsyncOperationStatusWithResponseAsync( - resourceGroupName, clusterName, extensionName, operationId, context) - .block(); + public AsyncOperationResultInner getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String extensionName, String operationId) { + return getAzureAsyncOperationStatusWithResponse( + resourceGroupName, clusterName, extensionName, operationId, Context.NONE) + .getValue(); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsImpl.java index 7c9181ac67ea..5ad970538cd5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsImpl.java @@ -19,10 +19,9 @@ import com.azure.resourcemanager.hdinsight.models.ClusterMonitoringResponse; import com.azure.resourcemanager.hdinsight.models.Extension; import com.azure.resourcemanager.hdinsight.models.Extensions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ExtensionsImpl implements Extensions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ExtensionsImpl.class); private final ExtensionsClient innerClient; @@ -43,15 +42,6 @@ public void enableMonitoring( this.serviceClient().enableMonitoring(resourceGroupName, clusterName, parameters, context); } - public ClusterMonitoringResponse getMonitoringStatus(String resourceGroupName, String clusterName) { - ClusterMonitoringResponseInner inner = this.serviceClient().getMonitoringStatus(resourceGroupName, clusterName); - if (inner != null) { - return new ClusterMonitoringResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getMonitoringStatusWithResponse( String resourceGroupName, String clusterName, Context context) { Response inner = @@ -67,6 +57,15 @@ public Response getMonitoringStatusWithResponse( } } + public ClusterMonitoringResponse getMonitoringStatus(String resourceGroupName, String clusterName) { + ClusterMonitoringResponseInner inner = this.serviceClient().getMonitoringStatus(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterMonitoringResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public void disableMonitoring(String resourceGroupName, String clusterName) { this.serviceClient().disableMonitoring(resourceGroupName, clusterName); } @@ -84,15 +83,6 @@ public void enableAzureMonitor( this.serviceClient().enableAzureMonitor(resourceGroupName, clusterName, parameters, context); } - public AzureMonitorResponse getAzureMonitorStatus(String resourceGroupName, String clusterName) { - AzureMonitorResponseInner inner = this.serviceClient().getAzureMonitorStatus(resourceGroupName, clusterName); - if (inner != null) { - return new AzureMonitorResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getAzureMonitorStatusWithResponse( String resourceGroupName, String clusterName, Context context) { Response inner = @@ -108,6 +98,15 @@ public Response getAzureMonitorStatusWithResponse( } } + public AzureMonitorResponse getAzureMonitorStatus(String resourceGroupName, String clusterName) { + AzureMonitorResponseInner inner = this.serviceClient().getAzureMonitorStatus(resourceGroupName, clusterName); + if (inner != null) { + return new AzureMonitorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public void disableAzureMonitor(String resourceGroupName, String clusterName) { this.serviceClient().disableAzureMonitor(resourceGroupName, clusterName); } @@ -125,15 +124,6 @@ public void create( this.serviceClient().create(resourceGroupName, clusterName, extensionName, parameters, context); } - public ClusterMonitoringResponse get(String resourceGroupName, String clusterName, String extensionName) { - ClusterMonitoringResponseInner inner = this.serviceClient().get(resourceGroupName, clusterName, extensionName); - if (inner != null) { - return new ClusterMonitoringResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String clusterName, String extensionName, Context context) { Response inner = @@ -149,6 +139,15 @@ public Response getWithResponse( } } + public ClusterMonitoringResponse get(String resourceGroupName, String clusterName, String extensionName) { + ClusterMonitoringResponseInner inner = this.serviceClient().get(resourceGroupName, clusterName, extensionName); + if (inner != null) { + return new ClusterMonitoringResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String clusterName, String extensionName) { this.serviceClient().delete(resourceGroupName, clusterName, extensionName); } @@ -157,19 +156,6 @@ public void delete(String resourceGroupName, String clusterName, String extensio this.serviceClient().delete(resourceGroupName, clusterName, extensionName, context); } - public AsyncOperationResult getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String extensionName, String operationId) { - AsyncOperationResultInner inner = - this - .serviceClient() - .getAzureAsyncOperationStatus(resourceGroupName, clusterName, extensionName, operationId); - if (inner != null) { - return new AsyncOperationResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getAzureAsyncOperationStatusWithResponse( String resourceGroupName, String clusterName, String extensionName, String operationId, Context context) { Response inner = @@ -188,6 +174,19 @@ public Response getAzureAsyncOperationStatusWithResponse( } } + public AsyncOperationResult getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String extensionName, String operationId) { + AsyncOperationResultInner inner = + this + .serviceClient() + .getAzureAsyncOperationStatus(resourceGroupName, clusterName, extensionName, operationId); + if (inner != null) { + return new AsyncOperationResultImpl(inner, this.manager()); + } else { + return null; + } + } + private ExtensionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.java index 1db260ef91fa..968f5fa92051 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.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; @@ -19,9 +18,8 @@ @ServiceClientBuilder(serviceClients = {HDInsightManagementClientImpl.class}) public final class HDInsightManagementClientBuilder { /* - * The subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every - * service call. + * The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. */ private String subscriptionId; @@ -70,34 +68,34 @@ public HDInsightManagementClientBuilder 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 HDInsightManagementClientBuilder. */ - public HDInsightManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public HDInsightManagementClientBuilder 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 HDInsightManagementClientBuilder. */ - public HDInsightManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public HDInsightManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -123,27 +121,26 @@ public HDInsightManagementClientBuilder serializerAdapter(SerializerAdapter seri * @return an instance of HDInsightManagementClientImpl. */ public HDInsightManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - 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(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); HDInsightManagementClientImpl client = new HDInsightManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java index 2357d2379d24..5a904a2ae7b2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -39,15 +40,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the HDInsightManagementClientImpl type. */ @ServiceClient(builder = HDInsightManagementClientBuilder.class) public final class HDInsightManagementClientImpl implements HDInsightManagementClient { - private final ClientLogger logger = new ClientLogger(HDInsightManagementClientImpl.class); - /** * The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part * of the URI for every service call. @@ -309,10 +307,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -376,7 +371,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -435,4 +430,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(HDInsightManagementClientImpl.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java index 9620f8ac00af..ba47157ee959 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java @@ -23,7 +23,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.hdinsight.fluent.LocationsClient; import com.azure.resourcemanager.hdinsight.fluent.models.AsyncOperationResultInner; import com.azure.resourcemanager.hdinsight.fluent.models.BillingResponseListResultInner; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in LocationsClient. */ public final class LocationsClientImpl implements LocationsClient { - private final ClientLogger logger = new ClientLogger(LocationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LocationsService service; @@ -150,7 +147,8 @@ Mono> validateClusterCreateRequest( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 capabilities for the specified location. + * @return the capabilities for the specified location along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getCapabilitiesWithResponseAsync(String location) { @@ -192,7 +190,8 @@ private Mono> getCapabilitiesWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 capabilities for the specified location. + * @return the capabilities for the specified location along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getCapabilitiesWithResponseAsync(String location, Context context) { @@ -230,48 +229,40 @@ private Mono> getCapabilitiesWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 capabilities for the specified location. + * @return the capabilities for the specified location on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getCapabilitiesAsync(String location) { - return getCapabilitiesWithResponseAsync(location) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getCapabilitiesWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the capabilities for the specified location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the capabilities for the specified location. + * @return the capabilities for the specified location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CapabilitiesResultInner getCapabilities(String location) { - return getCapabilitiesAsync(location).block(); + public Response getCapabilitiesWithResponse(String location, Context context) { + return getCapabilitiesWithResponseAsync(location, context).block(); } /** * Gets the capabilities for the specified location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the capabilities for the specified location. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCapabilitiesWithResponse(String location, Context context) { - return getCapabilitiesWithResponseAsync(location, context).block(); + public CapabilitiesResultInner getCapabilities(String location) { + return getCapabilitiesWithResponse(location, Context.NONE).getValue(); } /** @@ -281,7 +272,8 @@ public Response getCapabilitiesWithResponse(String loca * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional usages for a subscription. + * @return the response for the operation to get regional usages for a subscription along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listUsagesWithResponseAsync(String location) { @@ -323,7 +315,8 @@ private Mono> listUsagesWithResponseAsync(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 the response for the operation to get regional usages for a subscription. + * @return the response for the operation to get regional usages for a subscription along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listUsagesWithResponseAsync(String location, Context context) { @@ -361,48 +354,41 @@ private Mono> listUsagesWithResponseAsync(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 the response for the operation to get regional usages for a subscription. + * @return the response for the operation to get regional usages for a subscription on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listUsagesAsync(String location) { - return listUsagesWithResponseAsync(location) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listUsagesWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Lists the usages for the specified location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional usages for a subscription. + * @return the response for the operation to get regional usages for a subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UsagesListResultInner listUsages(String location) { - return listUsagesAsync(location).block(); + public Response listUsagesWithResponse(String location, Context context) { + return listUsagesWithResponseAsync(location, context).block(); } /** * Lists the usages for the specified location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response for the operation to get regional usages for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listUsagesWithResponse(String location, Context context) { - return listUsagesWithResponseAsync(location, context).block(); + public UsagesListResultInner listUsages(String location) { + return listUsagesWithResponse(location, Context.NONE).getValue(); } /** @@ -412,7 +398,8 @@ public Response listUsagesWithResponse(String location, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional billingSpecs for a subscription. + * @return the response for the operation to get regional billingSpecs for a subscription along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBillingSpecsWithResponseAsync(String location) { @@ -454,7 +441,8 @@ private Mono> listBillingSpecsWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional billingSpecs for a subscription. + * @return the response for the operation to get regional billingSpecs for a subscription along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBillingSpecsWithResponseAsync( @@ -493,48 +481,42 @@ private Mono> listBillingSpecsWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional billingSpecs for a subscription. + * @return the response for the operation to get regional billingSpecs for a subscription on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listBillingSpecsAsync(String location) { - return listBillingSpecsWithResponseAsync(location) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listBillingSpecsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Lists the billingSpecs for the specified subscription and location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional billingSpecs for a subscription. + * @return the response for the operation to get regional billingSpecs for a subscription along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BillingResponseListResultInner listBillingSpecs(String location) { - return listBillingSpecsAsync(location).block(); + public Response listBillingSpecsWithResponse(String location, Context context) { + return listBillingSpecsWithResponseAsync(location, context).block(); } /** * Lists the billingSpecs for the specified subscription and location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response for the operation to get regional billingSpecs for a subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBillingSpecsWithResponse(String location, Context context) { - return listBillingSpecsWithResponseAsync(location, context).block(); + public BillingResponseListResultInner listBillingSpecs(String location) { + return listBillingSpecsWithResponse(location, Context.NONE).getValue(); } /** @@ -545,7 +527,7 @@ public Response listBillingSpecsWithResponse(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -593,7 +575,7 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAzureAsyncOperationStatusWithResponseAsync( @@ -637,19 +619,12 @@ private Mono> getAzureAsyncOperationStatusWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAzureAsyncOperationStatusAsync(String location, String operationId) { return getAzureAsyncOperationStatusWithResponseAsync(location, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -657,14 +632,16 @@ private Mono getAzureAsyncOperationStatusAsync(String * * @param location The Azure location (region) for which to make the request. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationResultInner getAzureAsyncOperationStatus(String location, String operationId) { - return getAzureAsyncOperationStatusAsync(location, operationId).block(); + public Response getAzureAsyncOperationStatusWithResponse( + String location, String operationId, Context context) { + return getAzureAsyncOperationStatusWithResponseAsync(location, operationId, context).block(); } /** @@ -672,16 +649,14 @@ public AsyncOperationResultInner getAzureAsyncOperationStatus(String location, S * * @param location The Azure location (region) for which to make the request. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAzureAsyncOperationStatusWithResponse( - String location, String operationId, Context context) { - return getAzureAsyncOperationStatusWithResponseAsync(location, operationId, context).block(); + public AsyncOperationResultInner getAzureAsyncOperationStatus(String location, String operationId) { + return getAzureAsyncOperationStatusWithResponse(location, operationId, Context.NONE).getValue(); } /** @@ -692,7 +667,8 @@ public Response getAzureAsyncOperationStatusWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response spec of checking name availability. + * @return the response spec of checking name availability along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -742,7 +718,8 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response spec of checking name availability. + * @return the response spec of checking name availability along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -788,20 +765,13 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response spec of checking name availability. + * @return the response spec of checking name availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync( String location, NameAvailabilityCheckRequestParameters parameters) { return checkNameAvailabilityWithResponseAsync(location, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -809,15 +779,16 @@ private Mono checkNameAvailabilityAsync( * * @param location The Azure location (region) for which to make the request. * @param parameters The request spec of checking name availability. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response spec of checking name availability. + * @return the response spec of checking name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityCheckResultInner checkNameAvailability( - String location, NameAvailabilityCheckRequestParameters parameters) { - return checkNameAvailabilityAsync(location, parameters).block(); + public Response checkNameAvailabilityWithResponse( + String location, NameAvailabilityCheckRequestParameters parameters, Context context) { + return checkNameAvailabilityWithResponseAsync(location, parameters, context).block(); } /** @@ -825,16 +796,15 @@ public NameAvailabilityCheckResultInner checkNameAvailability( * * @param location The Azure location (region) for which to make the request. * @param parameters The request spec of checking name availability. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response spec of checking name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityCheckRequestParameters parameters, Context context) { - return checkNameAvailabilityWithResponseAsync(location, parameters, context).block(); + public NameAvailabilityCheckResultInner checkNameAvailability( + String location, NameAvailabilityCheckRequestParameters parameters) { + return checkNameAvailabilityWithResponse(location, parameters, Context.NONE).getValue(); } /** @@ -845,7 +815,8 @@ public Response checkNameAvailabilityWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of cluster create request validation. + * @return the response of cluster create request validation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateClusterCreateRequestWithResponseAsync( @@ -895,7 +866,8 @@ private Mono> validateClusterCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of cluster create request validation. + * @return the response of cluster create request validation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateClusterCreateRequestWithResponseAsync( @@ -941,20 +913,13 @@ private Mono> validateClusterCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of cluster create request validation. + * @return the response of cluster create request validation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateClusterCreateRequestAsync( String location, ClusterCreateRequestValidationParameters parameters) { return validateClusterCreateRequestWithResponseAsync(location, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -962,15 +927,16 @@ private Mono validateClusterCreateRequestAsy * * @param location The Azure location (region) for which to make the request. * @param parameters The cluster create request specification. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of cluster create request validation. + * @return the response of cluster create request validation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterCreateValidationResultInner validateClusterCreateRequest( - String location, ClusterCreateRequestValidationParameters parameters) { - return validateClusterCreateRequestAsync(location, parameters).block(); + public Response validateClusterCreateRequestWithResponse( + String location, ClusterCreateRequestValidationParameters parameters, Context context) { + return validateClusterCreateRequestWithResponseAsync(location, parameters, context).block(); } /** @@ -978,15 +944,14 @@ public ClusterCreateValidationResultInner validateClusterCreateRequest( * * @param location The Azure location (region) for which to make the request. * @param parameters The cluster create request specification. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of cluster create request validation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateClusterCreateRequestWithResponse( - String location, ClusterCreateRequestValidationParameters parameters, Context context) { - return validateClusterCreateRequestWithResponseAsync(location, parameters, context).block(); + public ClusterCreateValidationResultInner validateClusterCreateRequest( + String location, ClusterCreateRequestValidationParameters parameters) { + return validateClusterCreateRequestWithResponse(location, parameters, Context.NONE).getValue(); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsImpl.java index 51703e6be350..40a5c1f0a90c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsImpl.java @@ -24,10 +24,9 @@ import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckRequestParameters; import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckResult; import com.azure.resourcemanager.hdinsight.models.UsagesListResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LocationsImpl implements Locations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LocationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LocationsImpl.class); private final LocationsClient innerClient; @@ -39,15 +38,6 @@ public LocationsImpl( this.serviceManager = serviceManager; } - public CapabilitiesResult getCapabilities(String location) { - CapabilitiesResultInner inner = this.serviceClient().getCapabilities(location); - if (inner != null) { - return new CapabilitiesResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getCapabilitiesWithResponse(String location, Context context) { Response inner = this.serviceClient().getCapabilitiesWithResponse(location, context); if (inner != null) { @@ -61,10 +51,10 @@ public Response getCapabilitiesWithResponse(String location, } } - public UsagesListResult listUsages(String location) { - UsagesListResultInner inner = this.serviceClient().listUsages(location); + public CapabilitiesResult getCapabilities(String location) { + CapabilitiesResultInner inner = this.serviceClient().getCapabilities(location); if (inner != null) { - return new UsagesListResultImpl(inner, this.manager()); + return new CapabilitiesResultImpl(inner, this.manager()); } else { return null; } @@ -83,10 +73,10 @@ public Response listUsagesWithResponse(String location, Contex } } - public BillingResponseListResult listBillingSpecs(String location) { - BillingResponseListResultInner inner = this.serviceClient().listBillingSpecs(location); + public UsagesListResult listUsages(String location) { + UsagesListResultInner inner = this.serviceClient().listUsages(location); if (inner != null) { - return new BillingResponseListResultImpl(inner, this.manager()); + return new UsagesListResultImpl(inner, this.manager()); } else { return null; } @@ -106,10 +96,10 @@ public Response listBillingSpecsWithResponse(String l } } - public AsyncOperationResult getAzureAsyncOperationStatus(String location, String operationId) { - AsyncOperationResultInner inner = this.serviceClient().getAzureAsyncOperationStatus(location, operationId); + public BillingResponseListResult listBillingSpecs(String location) { + BillingResponseListResultInner inner = this.serviceClient().listBillingSpecs(location); if (inner != null) { - return new AsyncOperationResultImpl(inner, this.manager()); + return new BillingResponseListResultImpl(inner, this.manager()); } else { return null; } @@ -130,11 +120,10 @@ public Response getAzureAsyncOperationStatusWithResponse( } } - public NameAvailabilityCheckResult checkNameAvailability( - String location, NameAvailabilityCheckRequestParameters parameters) { - NameAvailabilityCheckResultInner inner = this.serviceClient().checkNameAvailability(location, parameters); + public AsyncOperationResult getAzureAsyncOperationStatus(String location, String operationId) { + AsyncOperationResultInner inner = this.serviceClient().getAzureAsyncOperationStatus(location, operationId); if (inner != null) { - return new NameAvailabilityCheckResultImpl(inner, this.manager()); + return new AsyncOperationResultImpl(inner, this.manager()); } else { return null; } @@ -155,12 +144,11 @@ public Response checkNameAvailabilityWithResponse( } } - public ClusterCreateValidationResult validateClusterCreateRequest( - String location, ClusterCreateRequestValidationParameters parameters) { - ClusterCreateValidationResultInner inner = - this.serviceClient().validateClusterCreateRequest(location, parameters); + public NameAvailabilityCheckResult checkNameAvailability( + String location, NameAvailabilityCheckRequestParameters parameters) { + NameAvailabilityCheckResultInner inner = this.serviceClient().checkNameAvailability(location, parameters); if (inner != null) { - return new ClusterCreateValidationResultImpl(inner, this.manager()); + return new NameAvailabilityCheckResultImpl(inner, this.manager()); } else { return null; } @@ -181,6 +169,17 @@ public Response validateClusterCreateRequestWithR } } + public ClusterCreateValidationResult validateClusterCreateRequest( + String location, ClusterCreateRequestValidationParameters parameters) { + ClusterCreateValidationResultInner inner = + this.serviceClient().validateClusterCreateRequest(location, parameters); + if (inner != null) { + return new ClusterCreateValidationResultImpl(inner, this.manager()); + } else { + return null; + } + } + private LocationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsClientImpl.java index 8e15cc15123d..d7eccbb428b8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsClientImpl.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.hdinsight.fluent.OperationsClient; import com.azure.resourcemanager.hdinsight.fluent.models.OperationInner; import com.azure.resourcemanager.hdinsight.models.OperationListResult; @@ -33,8 +32,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; @@ -85,7 +82,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +161,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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +174,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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +188,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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -199,11 +198,13 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -234,12 +235,14 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations 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/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsImpl.java index 7abbe67b28a6..9309dc6e48eb 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.hdinsight.fluent.models.OperationInner; import com.azure.resourcemanager.hdinsight.models.Operation; import com.azure.resourcemanager.hdinsight.models.Operations; -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/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionImpl.java index 4f44ccbbf383..0e12954f0603 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionImpl.java @@ -50,6 +50,10 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public String resourceGroupName() { + return resourceGroupName; + } + public PrivateEndpointConnectionInner innerModel() { return this.innerObject; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java index ddf33ea8393f..1f036b4f0aeb 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java @@ -29,7 +29,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.hdinsight.fluent.PrivateEndpointConnectionsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateEndpointConnectionsService service; @@ -152,7 +149,8 @@ Mono> listByClusterNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list private endpoint connections response. + * @return the list private endpoint connections response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -210,7 +208,8 @@ private Mono> listByClusterSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list private endpoint connections response. + * @return the list private endpoint connections response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -264,7 +263,7 @@ private Mono> listByClusterSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { @@ -282,7 +281,7 @@ private PagedFlux listByClusterAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync( @@ -300,7 +299,7 @@ private PagedFlux listByClusterAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster(String resourceGroupName, String clusterName) { @@ -316,7 +315,7 @@ public PagedIterable listByCluster(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster( @@ -334,7 +333,7 @@ public PagedIterable listByCluster( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private endpoint connection. + * @return the private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -401,7 +400,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 the private endpoint connection. + * @return the private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -465,7 +464,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 the private endpoint connection. + * @return the {@link PollerFlux} for polling of the private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> @@ -483,7 +482,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -497,7 +496,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 the private endpoint connection. + * @return the {@link PollerFlux} for polling of the private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> @@ -531,7 +530,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 the private endpoint connection. + * @return the {@link SyncPoller} for polling of the private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -554,7 +553,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private endpoint connection. + * @return the {@link SyncPoller} for polling of the private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -578,7 +577,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private endpoint connection. + * @return the private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -602,7 +601,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 the private endpoint connection. + * @return the private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -671,7 +670,8 @@ public PrivateEndpointConnectionInner 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 the specific private endpoint connection. + * @return the specific private endpoint connection along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -728,7 +728,8 @@ 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 the specific private endpoint connection. + * @return the specific private endpoint connection along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -781,20 +782,13 @@ 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 the specific private endpoint connection. + * @return the specific private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String clusterName, String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -803,15 +797,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specific private endpoint connection. + * @return the specific private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { - return getAsync(resourceGroupName, clusterName, privateEndpointConnectionName).block(); + public Response getWithResponse( + String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block(); } /** @@ -820,16 +815,15 @@ public PrivateEndpointConnectionInner get( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specific private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block(); + public PrivateEndpointConnectionInner get( + String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE).getValue(); } /** @@ -841,7 +835,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 the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -898,7 +892,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( @@ -951,7 +945,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( @@ -960,7 +954,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName); 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()); } /** @@ -973,7 +968,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( @@ -995,7 +990,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( @@ -1013,7 +1008,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( @@ -1030,7 +1025,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 clusterName, String privateEndpointConnectionName) { @@ -1049,7 +1044,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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( @@ -1094,11 +1089,13 @@ public void delete( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list private endpoint connections response. + * @return the list private endpoint connections response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { @@ -1129,12 +1126,14 @@ private Mono> listByClusterNextSin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list private endpoint connections response. + * @return the list private endpoint connections response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsImpl.java index f7ebda23725d..fc58182f1f75 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.hdinsight.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnection; import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); private final PrivateEndpointConnectionsClient innerClient; @@ -42,17 +41,6 @@ public PagedIterable listByCluster( return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - public PrivateEndpointConnection get( - String resourceGroupName, String clusterName, String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(resourceGroupName, clusterName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { Response inner = @@ -70,6 +58,17 @@ public Response getWithResponse( } } + public PrivateEndpointConnection get( + String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner = + this.serviceClient().get(resourceGroupName, clusterName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) { this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName); } @@ -82,7 +81,7 @@ public void delete( public PrivateEndpointConnection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -90,14 +89,14 @@ public PrivateEndpointConnection getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -113,7 +112,7 @@ public PrivateEndpointConnection 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 @@ -121,14 +120,14 @@ public Response getByIdWithResponse(String id, Contex } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -142,7 +141,7 @@ public Response getByIdWithResponse(String id, Contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -150,14 +149,14 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,7 +170,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 @@ -179,14 +178,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java index c83334c1784d..ba10103bd9c1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java @@ -21,7 +21,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.hdinsight.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceListResultInner; @@ -29,8 +28,6 @@ /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateLinkResourcesService service; @@ -96,7 +93,7 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private link resources. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterWithResponseAsync( @@ -145,7 +142,7 @@ private Mono> listByClusterWithResp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private link resources. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterWithResponseAsync( @@ -190,19 +187,12 @@ private Mono> listByClusterWithResp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private link resources. + * @return a list of private link resources on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listByClusterAsync(String resourceGroupName, String clusterName) { return listByClusterWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -210,14 +200,16 @@ private Mono listByClusterAsync(String resou * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. + * @return a list of private link resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner listByCluster(String resourceGroupName, String clusterName) { - return listByClusterAsync(resourceGroupName, clusterName).block(); + public Response listByClusterWithResponse( + String resourceGroupName, String clusterName, Context context) { + return listByClusterWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -225,16 +217,14 @@ public PrivateLinkResourceListResultInner listByCluster(String resourceGroupName * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listByClusterWithResponse( - String resourceGroupName, String clusterName, Context context) { - return listByClusterWithResponseAsync(resourceGroupName, clusterName, context).block(); + public PrivateLinkResourceListResultInner listByCluster(String resourceGroupName, String clusterName) { + return listByClusterWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -246,7 +236,7 @@ public Response listByClusterWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specific private link resource. + * @return the specific private link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -302,7 +292,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 the specific private link resource. + * @return the specific private link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -354,20 +344,13 @@ 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 the specific private link resource. + * @return the specific private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String clusterName, String privateLinkResourceName) { return getWithResponseAsync(resourceGroupName, clusterName, privateLinkResourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -376,14 +359,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specific private link resource. + * @return the specific private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner get(String resourceGroupName, String clusterName, String privateLinkResourceName) { - return getAsync(resourceGroupName, clusterName, privateLinkResourceName).block(); + public Response getWithResponse( + String resourceGroupName, String clusterName, String privateLinkResourceName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, privateLinkResourceName, context).block(); } /** @@ -392,15 +377,13 @@ public PrivateLinkResourceInner get(String resourceGroupName, String clusterName * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specific private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, privateLinkResourceName, context).block(); + public PrivateLinkResourceInner get(String resourceGroupName, String clusterName, String privateLinkResourceName) { + return getWithResponse(resourceGroupName, clusterName, privateLinkResourceName, Context.NONE).getValue(); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesImpl.java index bde9915e74d4..179db1df1c42 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.hdinsight.models.PrivateLinkResource; import com.azure.resourcemanager.hdinsight.models.PrivateLinkResourceListResult; import com.azure.resourcemanager.hdinsight.models.PrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); private final PrivateLinkResourcesClient innerClient; @@ -29,15 +28,6 @@ public PrivateLinkResourcesImpl( this.serviceManager = serviceManager; } - public PrivateLinkResourceListResult listByCluster(String resourceGroupName, String clusterName) { - PrivateLinkResourceListResultInner inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listByClusterWithResponse( String resourceGroupName, String clusterName, Context context) { Response inner = @@ -53,11 +43,10 @@ public Response listByClusterWithResponse( } } - public PrivateLinkResource get(String resourceGroupName, String clusterName, String privateLinkResourceName) { - PrivateLinkResourceInner inner = - this.serviceClient().get(resourceGroupName, clusterName, privateLinkResourceName); + public PrivateLinkResourceListResult listByCluster(String resourceGroupName, String clusterName) { + PrivateLinkResourceListResultInner inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); if (inner != null) { - return new PrivateLinkResourceImpl(inner, this.manager()); + return new PrivateLinkResourceListResultImpl(inner, this.manager()); } else { return null; } @@ -78,6 +67,16 @@ public Response getWithResponse( } } + public PrivateLinkResource get(String resourceGroupName, String clusterName, String privateLinkResourceName) { + PrivateLinkResourceInner inner = + this.serviceClient().get(resourceGroupName, clusterName, privateLinkResourceName); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + private PrivateLinkResourcesClient serviceClient() { return this.innerClient; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java index e7a53ac7d94e..8490731978ca 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java @@ -26,7 +26,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.hdinsight.fluent.ScriptActionsClient; import com.azure.resourcemanager.hdinsight.fluent.models.AsyncOperationResultInner; import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in ScriptActionsClient. */ public final class ScriptActionsClientImpl implements ScriptActionsClient { - private final ClientLogger logger = new ClientLogger(ScriptActionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ScriptActionsService service; @@ -144,7 +141,7 @@ Mono> listByClusterNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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( @@ -198,7 +195,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( @@ -248,12 +245,11 @@ 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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterName, String scriptName) { - return deleteWithResponseAsync(resourceGroupName, clusterName, scriptName) - .flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, clusterName, scriptName).flatMap(ignored -> Mono.empty()); } /** @@ -262,13 +258,16 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptName The name of the script. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String scriptName) { - deleteAsync(resourceGroupName, clusterName, scriptName).block(); + public Response deleteWithResponse( + String resourceGroupName, String clusterName, String scriptName, Context context) { + return deleteWithResponseAsync(resourceGroupName, clusterName, scriptName, context).block(); } /** @@ -277,16 +276,13 @@ public void delete(String resourceGroupName, String clusterName, String scriptNa * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptName The name of the script. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String clusterName, String scriptName, Context context) { - return deleteWithResponseAsync(resourceGroupName, clusterName, scriptName, context).block(); + public void delete(String resourceGroupName, String clusterName, String scriptName) { + deleteWithResponse(resourceGroupName, clusterName, scriptName, Context.NONE); } /** @@ -297,7 +293,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 persisted script action for the cluster. + * @return the persisted script action for the cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -355,7 +352,8 @@ private Mono> listByClusterSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 persisted script action for the cluster. + * @return the persisted script action for the cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -409,7 +407,7 @@ private Mono> listByClusterSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { @@ -427,7 +425,7 @@ private PagedFlux listByClusterAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync( @@ -445,7 +443,7 @@ private PagedFlux listByClusterAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster(String resourceGroupName, String clusterName) { @@ -461,7 +459,7 @@ public PagedIterable listByCluster(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster( @@ -478,7 +476,8 @@ public PagedIterable listByCluster( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 script execution detail for the given script execution ID. + * @return the script execution detail for the given script execution ID along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExecutionDetailWithResponseAsync( @@ -533,7 +532,8 @@ private Mono> getExecutionDetailWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 script execution detail for the given script execution ID. + * @return the script execution detail for the given script execution ID along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExecutionDetailWithResponseAsync( @@ -584,20 +584,13 @@ private Mono> getExecutionDetailWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 script execution detail for the given script execution ID. + * @return the script execution detail for the given script execution ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getExecutionDetailAsync( String resourceGroupName, String clusterName, String scriptExecutionId) { return getExecutionDetailWithResponseAsync(resourceGroupName, clusterName, scriptExecutionId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -606,15 +599,16 @@ private Mono getExecutionDetailAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the script execution detail for the given script execution ID. + * @return the script execution detail for the given script execution ID along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RuntimeScriptActionDetailInner getExecutionDetail( - String resourceGroupName, String clusterName, String scriptExecutionId) { - return getExecutionDetailAsync(resourceGroupName, clusterName, scriptExecutionId).block(); + public Response getExecutionDetailWithResponse( + String resourceGroupName, String clusterName, String scriptExecutionId, Context context) { + return getExecutionDetailWithResponseAsync(resourceGroupName, clusterName, scriptExecutionId, context).block(); } /** @@ -623,16 +617,16 @@ public RuntimeScriptActionDetailInner getExecutionDetail( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the script execution detail for the given script execution ID. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getExecutionDetailWithResponse( - String resourceGroupName, String clusterName, String scriptExecutionId, Context context) { - return getExecutionDetailWithResponseAsync(resourceGroupName, clusterName, scriptExecutionId, context).block(); + public RuntimeScriptActionDetailInner getExecutionDetail( + String resourceGroupName, String clusterName, String scriptExecutionId) { + return getExecutionDetailWithResponse(resourceGroupName, clusterName, scriptExecutionId, Context.NONE) + .getValue(); } /** @@ -644,7 +638,8 @@ public Response getExecutionDetailWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status of execution operation. + * @return the async operation status of execution operation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExecutionAsyncOperationStatusWithResponseAsync( @@ -698,7 +693,8 @@ private Mono> getExecutionAsyncOperationStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status of execution operation. + * @return the async operation status of execution operation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getExecutionAsyncOperationStatusWithResponseAsync( @@ -748,20 +744,13 @@ private Mono> getExecutionAsyncOperationStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status of execution operation. + * @return the async operation status of execution operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getExecutionAsyncOperationStatusAsync( String resourceGroupName, String clusterName, String operationId) { return getExecutionAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -770,15 +759,17 @@ private Mono getExecutionAsyncOperationStatusAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status of execution operation. + * @return the async operation status of execution operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationResultInner getExecutionAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId) { - return getExecutionAsyncOperationStatusAsync(resourceGroupName, clusterName, operationId).block(); + public Response getExecutionAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context) { + return getExecutionAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId, context) + .block(); } /** @@ -787,27 +778,28 @@ public AsyncOperationResultInner getExecutionAsyncOperationStatus( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status of execution operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getExecutionAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context) { - return getExecutionAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId, context) - .block(); + public AsyncOperationResultInner getExecutionAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId) { + return getExecutionAsyncOperationStatusWithResponse(resourceGroupName, clusterName, operationId, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the persisted script action for the cluster. + * @return the persisted script action for the cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { @@ -838,12 +830,14 @@ private Mono> listByClusterNextSin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the persisted script action for the cluster. + * @return the persisted script action for the cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsImpl.java index b571d592edd5..fdfd66fa69dd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.hdinsight.models.AsyncOperationResult; import com.azure.resourcemanager.hdinsight.models.RuntimeScriptActionDetail; import com.azure.resourcemanager.hdinsight.models.ScriptActions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ScriptActionsImpl implements ScriptActions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptActionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ScriptActionsImpl.class); private final ScriptActionsClient innerClient; @@ -30,15 +29,15 @@ public ScriptActionsImpl( this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String clusterName, String scriptName) { - this.serviceClient().delete(resourceGroupName, clusterName, scriptName); - } - public Response deleteWithResponse( String resourceGroupName, String clusterName, String scriptName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, clusterName, scriptName, context); } + public void delete(String resourceGroupName, String clusterName, String scriptName) { + this.serviceClient().delete(resourceGroupName, clusterName, scriptName); + } + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); @@ -52,17 +51,6 @@ public PagedIterable listByCluster( return Utils.mapPage(inner, inner1 -> new RuntimeScriptActionDetailImpl(inner1, this.manager())); } - public RuntimeScriptActionDetail getExecutionDetail( - String resourceGroupName, String clusterName, String scriptExecutionId) { - RuntimeScriptActionDetailInner inner = - this.serviceClient().getExecutionDetail(resourceGroupName, clusterName, scriptExecutionId); - if (inner != null) { - return new RuntimeScriptActionDetailImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getExecutionDetailWithResponse( String resourceGroupName, String clusterName, String scriptExecutionId, Context context) { Response inner = @@ -80,12 +68,12 @@ public Response getExecutionDetailWithResponse( } } - public AsyncOperationResult getExecutionAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId) { - AsyncOperationResultInner inner = - this.serviceClient().getExecutionAsyncOperationStatus(resourceGroupName, clusterName, operationId); + public RuntimeScriptActionDetail getExecutionDetail( + String resourceGroupName, String clusterName, String scriptExecutionId) { + RuntimeScriptActionDetailInner inner = + this.serviceClient().getExecutionDetail(resourceGroupName, clusterName, scriptExecutionId); if (inner != null) { - return new AsyncOperationResultImpl(inner, this.manager()); + return new RuntimeScriptActionDetailImpl(inner, this.manager()); } else { return null; } @@ -108,6 +96,17 @@ public Response getExecutionAsyncOperationStatusWithRespon } } + public AsyncOperationResult getExecutionAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId) { + AsyncOperationResultInner inner = + this.serviceClient().getExecutionAsyncOperationStatus(resourceGroupName, clusterName, operationId); + if (inner != null) { + return new AsyncOperationResultImpl(inner, this.manager()); + } else { + return null; + } + } + private ScriptActionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java index 12771370187d..7b47c73856de 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java @@ -26,7 +26,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.hdinsight.fluent.ScriptExecutionHistoriesClient; import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner; import com.azure.resourcemanager.hdinsight.models.ScriptActionExecutionHistoryList; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in ScriptExecutionHistoriesClient. */ public final class ScriptExecutionHistoriesClientImpl implements ScriptExecutionHistoriesClient { - private final ClientLogger logger = new ClientLogger(ScriptExecutionHistoriesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ScriptExecutionHistoriesService service; @@ -111,7 +108,8 @@ Mono> listByClusterNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list script execution history response. + * @return the list script execution history response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -169,7 +167,8 @@ private Mono> listByClusterSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list script execution history response. + * @return the list script execution history response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterSinglePageAsync( @@ -223,7 +222,7 @@ private Mono> listByClusterSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { @@ -241,7 +240,7 @@ private PagedFlux listByClusterAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterAsync( @@ -259,7 +258,7 @@ private PagedFlux listByClusterAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster(String resourceGroupName, String clusterName) { @@ -275,7 +274,7 @@ public PagedIterable listByCluster(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCluster( @@ -292,7 +291,7 @@ public PagedIterable listByCluster( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> promoteWithResponseAsync( @@ -347,7 +346,7 @@ private Mono> promoteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> promoteWithResponseAsync( @@ -398,12 +397,12 @@ private Mono> promoteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 promoteAsync(String resourceGroupName, String clusterName, String scriptExecutionId) { return promoteWithResponseAsync(resourceGroupName, clusterName, scriptExecutionId) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** @@ -412,13 +411,16 @@ private Mono promoteAsync(String resourceGroupName, String clusterName, St * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void promote(String resourceGroupName, String clusterName, String scriptExecutionId) { - promoteAsync(resourceGroupName, clusterName, scriptExecutionId).block(); + public Response promoteWithResponse( + String resourceGroupName, String clusterName, String scriptExecutionId, Context context) { + return promoteWithResponseAsync(resourceGroupName, clusterName, scriptExecutionId, context).block(); } /** @@ -427,26 +429,25 @@ public void promote(String resourceGroupName, String clusterName, String scriptE * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response promoteWithResponse( - String resourceGroupName, String clusterName, String scriptExecutionId, Context context) { - return promoteWithResponseAsync(resourceGroupName, clusterName, scriptExecutionId, context).block(); + public void promote(String resourceGroupName, String clusterName, String scriptExecutionId) { + promoteWithResponse(resourceGroupName, clusterName, scriptExecutionId, Context.NONE); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list script execution history response. + * @return the list script execution history response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync(String nextLink) { @@ -477,12 +478,14 @@ private Mono> listByClusterNextSin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list script execution history response. + * @return the list script execution history response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterNextSinglePageAsync( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesImpl.java index 4004787a961b..578769a1244d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner; import com.azure.resourcemanager.hdinsight.models.RuntimeScriptActionDetail; import com.azure.resourcemanager.hdinsight.models.ScriptExecutionHistories; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ScriptExecutionHistoriesImpl implements ScriptExecutionHistories { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptExecutionHistoriesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionHistoriesImpl.class); private final ScriptExecutionHistoriesClient innerClient; @@ -41,15 +40,15 @@ public PagedIterable listByCluster( return Utils.mapPage(inner, inner1 -> new RuntimeScriptActionDetailImpl(inner1, this.manager())); } - public void promote(String resourceGroupName, String clusterName, String scriptExecutionId) { - this.serviceClient().promote(resourceGroupName, clusterName, scriptExecutionId); - } - public Response promoteWithResponse( String resourceGroupName, String clusterName, String scriptExecutionId, Context context) { return this.serviceClient().promoteWithResponse(resourceGroupName, clusterName, scriptExecutionId, context); } + public void promote(String resourceGroupName, String clusterName, String scriptExecutionId) { + this.serviceClient().promote(resourceGroupName, clusterName, scriptExecutionId); + } + private ScriptExecutionHistoriesClient serviceClient() { return this.innerClient; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java index ad0be496d5e2..7122348a42ea 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java @@ -24,7 +24,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.hdinsight.fluent.VirtualMachinesClient; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { - private final ClientLogger logger = new ClientLogger(VirtualMachinesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualMachinesService service; @@ -119,7 +116,8 @@ Mono> getAsyncOperationStatus( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster hosts. + * @return result of the request to list cluster hosts along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listHostsWithResponseAsync( @@ -168,7 +166,8 @@ private Mono>> listHostsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster hosts. + * @return result of the request to list cluster hosts along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listHostsWithResponseAsync( @@ -213,19 +212,12 @@ private Mono>> listHostsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster hosts. + * @return result of the request to list cluster hosts on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsAsync(String resourceGroupName, String clusterName) { return listHostsWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -233,14 +225,16 @@ private Mono> listHostsAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list cluster hosts. + * @return result of the request to list cluster hosts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List listHosts(String resourceGroupName, String clusterName) { - return listHostsAsync(resourceGroupName, clusterName).block(); + public Response> listHostsWithResponse( + String resourceGroupName, String clusterName, Context context) { + return listHostsWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -248,16 +242,14 @@ public List listHosts(String resourceGroupName, String clusterNam * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list cluster hosts. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listHostsWithResponse( - String resourceGroupName, String clusterName, Context context) { - return listHostsWithResponseAsync(resourceGroupName, clusterName, context).block(); + public List listHosts(String resourceGroupName, String clusterName) { + return listHostsWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -269,7 +261,7 @@ public Response> listHostsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> restartHostsWithResponseAsync( @@ -323,7 +315,7 @@ private Mono>> restartHostsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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>> restartHostsWithResponseAsync( @@ -373,7 +365,7 @@ private Mono>> restartHostsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRestartHostsAsync( @@ -381,7 +373,8 @@ private PollerFlux, Void> beginRestartHostsAsync( Mono>> mono = restartHostsWithResponseAsync(resourceGroupName, clusterName, hosts); 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()); } /** @@ -394,7 +387,7 @@ private PollerFlux, Void> beginRestartHostsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRestartHostsAsync( @@ -416,7 +409,7 @@ private PollerFlux, Void> beginRestartHostsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRestartHosts( @@ -434,7 +427,7 @@ public SyncPoller, Void> beginRestartHosts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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> beginRestartHosts( @@ -451,7 +444,7 @@ public SyncPoller, Void> beginRestartHosts( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 restartHostsAsync(String resourceGroupName, String clusterName, List hosts) { @@ -470,7 +463,7 @@ private Mono restartHostsAsync(String resourceGroupName, String clusterNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 restartHostsAsync( @@ -520,7 +513,7 @@ public void restartHosts(String resourceGroupName, String clusterName, List> getAsyncOperationStatusWithResponseAsync( @@ -574,7 +567,7 @@ private Mono> getAsyncOperationStatusWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getAsyncOperationStatusWithResponseAsync( @@ -624,20 +617,13 @@ private Mono> getAsyncOperationStatusWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 async operation status. + * @return the async operation status on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsyncOperationStatusAsync( String resourceGroupName, String clusterName, String operationId) { return getAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -646,15 +632,16 @@ private Mono getAsyncOperationStatusAsync( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationResultInner getAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId) { - return getAsyncOperationStatusAsync(resourceGroupName, clusterName, operationId).block(); + public Response getAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context) { + return getAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId, context).block(); } /** @@ -663,15 +650,15 @@ public AsyncOperationResultInner getAsyncOperationStatus( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context) { - return getAsyncOperationStatusWithResponseAsync(resourceGroupName, clusterName, operationId, context).block(); + public AsyncOperationResultInner getAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId) { + return getAsyncOperationStatusWithResponse(resourceGroupName, clusterName, operationId, Context.NONE) + .getValue(); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesImpl.java index 54102e3a856e..1061f08dcd1d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesImpl.java @@ -14,13 +14,12 @@ import com.azure.resourcemanager.hdinsight.models.AsyncOperationResult; import com.azure.resourcemanager.hdinsight.models.HostInfo; import com.azure.resourcemanager.hdinsight.models.VirtualMachines; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public final class VirtualMachinesImpl implements VirtualMachines { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachinesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesImpl.class); private final VirtualMachinesClient innerClient; @@ -32,20 +31,6 @@ public VirtualMachinesImpl( this.serviceManager = serviceManager; } - public List listHosts(String resourceGroupName, String clusterName) { - List inner = this.serviceClient().listHosts(resourceGroupName, clusterName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new HostInfoImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - public Response> listHostsWithResponse( String resourceGroupName, String clusterName, Context context) { Response> inner = @@ -65,6 +50,20 @@ public Response> listHostsWithResponse( } } + public List listHosts(String resourceGroupName, String clusterName) { + List inner = this.serviceClient().listHosts(resourceGroupName, clusterName); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new HostInfoImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + public void restartHosts(String resourceGroupName, String clusterName, List hosts) { this.serviceClient().restartHosts(resourceGroupName, clusterName, hosts); } @@ -73,17 +72,6 @@ public void restartHosts(String resourceGroupName, String clusterName, List getAsyncOperationStatusWithResponse( String resourceGroupName, String clusterName, String operationId, Context context) { Response inner = @@ -101,6 +89,17 @@ public Response getAsyncOperationStatusWithResponse( } } + public AsyncOperationResult getAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId) { + AsyncOperationResultInner inner = + this.serviceClient().getAsyncOperationStatus(resourceGroupName, clusterName, operationId); + if (inner != null) { + return new AsyncOperationResultImpl(inner, this.manager()); + } else { + return null; + } + } + private VirtualMachinesClient serviceClient() { return this.innerClient; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AaddsResourceDetails.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AaddsResourceDetails.java index 01b21d4d455c..4686e1f20f1f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AaddsResourceDetails.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AaddsResourceDetails.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The Azure active directory domain service resource details. */ @Fluent public final class AaddsResourceDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AaddsResourceDetails.class); - /* * The Azure active directory domain service name. */ @@ -56,6 +52,10 @@ public final class AaddsResourceDetails { @JsonProperty(value = "tenantId") private String tenantId; + /** Creates an instance of AaddsResourceDetails class. */ + public AaddsResourceDetails() { + } + /** * Get the domainName property: The Azure active directory domain service name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetEndpoint.java index 8d4f3a55fe84..a1e8b244fb8b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetEndpoint.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetEndpoint.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** Gets the application SSH endpoint. */ @Fluent public final class ApplicationGetEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationGetEndpoint.class); - /* * The location of the endpoint. */ @@ -38,6 +34,10 @@ public final class ApplicationGetEndpoint { @JsonProperty(value = "privateIPAddress") private String privateIpAddress; + /** Creates an instance of ApplicationGetEndpoint class. */ + public ApplicationGetEndpoint() { + } + /** * Get the location property: The location of the endpoint. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetHttpsEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetHttpsEndpoint.java index 3fc4815bea02..34b6a71cc53d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetHttpsEndpoint.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationGetHttpsEndpoint.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** Gets the application HTTP endpoints. */ @Fluent public final class ApplicationGetHttpsEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationGetHttpsEndpoint.class); - /* * The list of access modes for the application. */ @@ -57,6 +53,10 @@ public final class ApplicationGetHttpsEndpoint { @JsonProperty(value = "disableGatewayAuth") private Boolean disableGatewayAuth; + /** Creates an instance of ApplicationGetHttpsEndpoint class. */ + public ApplicationGetHttpsEndpoint() { + } + /** * Get the accessModes property: The list of access modes for the application. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationListResult.java index 4ab84d4ac485..feb9f83f9566 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.hdinsight.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.ApplicationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Fluent public final class ApplicationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationListResult.class); - /* * The list of HDInsight applications installed on HDInsight cluster. */ @@ -31,6 +27,10 @@ public final class ApplicationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ApplicationListResult class. */ + public ApplicationListResult() { + } + /** * Get the value property: The list of HDInsight applications installed on HDInsight cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationProperties.java index a0963623e187..5f5d6c86f9f3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ApplicationProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The HDInsight cluster application GET response. */ @Fluent public final class ApplicationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationProperties.class); - /* * The list of roles in the cluster. */ @@ -87,6 +83,10 @@ public final class ApplicationProperties { @JsonProperty(value = "privateLinkConfigurations") private List privateLinkConfigurations; + /** Creates an instance of ApplicationProperties class. */ + public ApplicationProperties() { + } + /** * Get the computeProfile property: The list of roles in the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Applications.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Applications.java index 26633a40f9a1..4fde2bfe1304 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Applications.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Applications.java @@ -18,7 +18,7 @@ public interface Applications { * @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 result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -31,7 +31,7 @@ public interface Applications { * @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 result of the request to list cluster Applications. + * @return result of the request to list cluster Applications as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); @@ -41,12 +41,14 @@ public interface Applications { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of the specified application. + * @return properties of the specified application along with {@link Response}. */ - Application get(String resourceGroupName, String clusterName, String applicationName); + Response getWithResponse( + String resourceGroupName, String clusterName, String applicationName, Context context); /** * Gets properties of the specified application. @@ -54,14 +56,12 @@ public interface Applications { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties of the specified application. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String applicationName, Context context); + Application get(String resourceGroupName, String clusterName, String applicationName); /** * Deletes the specified application on the HDInsight cluster. @@ -95,13 +95,14 @@ Response getWithResponse( * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ - AsyncOperationResult getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String applicationName, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String applicationName, String operationId, Context context); /** * Gets the async operation status. @@ -110,14 +111,13 @@ AsyncOperationResult getAzureAsyncOperationStatus( * @param clusterName The name of the cluster. * @param applicationName The constant value for the application name. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ - Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String applicationName, String operationId, Context context); + AsyncOperationResult getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String applicationName, String operationId); /** * Gets properties of the specified application. @@ -126,7 +126,7 @@ Response getAzureAsyncOperationStatusWithResponse( * @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 properties of the specified application. + * @return properties of the specified application along with {@link Response}. */ Application getById(String id); @@ -138,7 +138,7 @@ Response getAzureAsyncOperationStatusWithResponse( * @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 properties of the specified application. + * @return properties of the specified application along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java index 1e0869a5eea9..3b26dab515a9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AsyncOperationState. */ +/** The async operation state. */ public final class AsyncOperationState extends ExpandableStringEnum { /** Static value InProgress for AsyncOperationState. */ public static final AsyncOperationState IN_PROGRESS = fromString("InProgress"); @@ -30,7 +30,11 @@ public static AsyncOperationState fromString(String name) { return fromString(name, AsyncOperationState.class); } - /** @return known AsyncOperationState values. */ + /** + * Gets known AsyncOperationState values. + * + * @return known AsyncOperationState values. + */ public static Collection values() { return values(AsyncOperationState.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Autoscale.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Autoscale.java index 94bb42bdc822..6ceae74ca59b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Autoscale.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Autoscale.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The autoscale request parameters. */ @Fluent public final class Autoscale { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Autoscale.class); - /* * Parameters for load-based autoscale */ @@ -26,6 +22,10 @@ public final class Autoscale { @JsonProperty(value = "recurrence") private AutoscaleRecurrence recurrence; + /** Creates an instance of Autoscale class. */ + public Autoscale() { + } + /** * Get the capacity property: Parameters for load-based autoscale. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleCapacity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleCapacity.java index a6485d1133bd..662f05b53d03 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleCapacity.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleCapacity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The load-based autoscale request parameters. */ @Fluent public final class AutoscaleCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoscaleCapacity.class); - /* * The minimum instance count of the cluster */ @@ -26,6 +22,10 @@ public final class AutoscaleCapacity { @JsonProperty(value = "maxInstanceCount") private Integer maxInstanceCount; + /** Creates an instance of AutoscaleCapacity class. */ + public AutoscaleCapacity() { + } + /** * Get the minInstanceCount property: The minimum instance count of the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleConfigurationUpdateParameter.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleConfigurationUpdateParameter.java index c0bba5babdfd..4478dfe0b79c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleConfigurationUpdateParameter.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleConfigurationUpdateParameter.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The autoscale configuration update parameter. */ @Fluent public final class AutoscaleConfigurationUpdateParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoscaleConfigurationUpdateParameter.class); - /* * The autoscale configuration. */ @JsonProperty(value = "autoscale") private Autoscale autoscale; + /** Creates an instance of AutoscaleConfigurationUpdateParameter class. */ + public AutoscaleConfigurationUpdateParameter() { + } + /** * Get the autoscale property: The autoscale configuration. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleRecurrence.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleRecurrence.java index c64f71f44464..629f27aec2da 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleRecurrence.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleRecurrence.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** Schedule-based autoscale request parameters. */ @Fluent public final class AutoscaleRecurrence { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoscaleRecurrence.class); - /* * The time zone for the autoscale schedule times */ @@ -27,6 +23,10 @@ public final class AutoscaleRecurrence { @JsonProperty(value = "schedule") private List schedule; + /** Creates an instance of AutoscaleRecurrence class. */ + public AutoscaleRecurrence() { + } + /** * Get the timeZone property: The time zone for the autoscale schedule times. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleSchedule.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleSchedule.java index 399b7ed9b7b3..6735f81e9a8c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleSchedule.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleSchedule.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and capacity. */ @Fluent public final class AutoscaleSchedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoscaleSchedule.class); - /* * Days of the week for a schedule-based autoscale rule */ @@ -27,6 +23,10 @@ public final class AutoscaleSchedule { @JsonProperty(value = "timeAndCapacity") private AutoscaleTimeAndCapacity timeAndCapacity; + /** Creates an instance of AutoscaleSchedule class. */ + public AutoscaleSchedule() { + } + /** * Get the days property: Days of the week for a schedule-based autoscale rule. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleTimeAndCapacity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleTimeAndCapacity.java index 2bbd3e640453..d21c25c5115c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleTimeAndCapacity.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AutoscaleTimeAndCapacity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** Time and capacity request parameters. */ @Fluent public final class AutoscaleTimeAndCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoscaleTimeAndCapacity.class); - /* * 24-hour time in the form xx:xx */ @@ -32,6 +28,10 @@ public final class AutoscaleTimeAndCapacity { @JsonProperty(value = "maxInstanceCount") private Integer maxInstanceCount; + /** Creates an instance of AutoscaleTimeAndCapacity class. */ + public AutoscaleTimeAndCapacity() { + } + /** * Get the time property: 24-hour time in the form xx:xx. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorRequest.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorRequest.java index 3d6633bcbf5d..fb445fad2e13 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorRequest.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorRequest.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The azure monitor parameters. */ @Fluent public final class AzureMonitorRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureMonitorRequest.class); - /* * The Log Analytics workspace ID. */ @@ -32,6 +28,10 @@ public final class AzureMonitorRequest { @JsonProperty(value = "selectedConfigurations") private AzureMonitorSelectedConfigurations selectedConfigurations; + /** Creates an instance of AzureMonitorRequest class. */ + public AzureMonitorRequest() { + } + /** * Get the workspaceId property: The Log Analytics workspace ID. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorSelectedConfigurations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorSelectedConfigurations.java index a658c96f5677..977f80cb326c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorSelectedConfigurations.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorSelectedConfigurations.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,8 +13,6 @@ /** The selected configurations for azure monitor. */ @Fluent public final class AzureMonitorSelectedConfigurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureMonitorSelectedConfigurations.class); - /* * The configuration version. */ @@ -36,6 +32,10 @@ public final class AzureMonitorSelectedConfigurations { @JsonProperty(value = "tableList") private List tableList; + /** Creates an instance of AzureMonitorSelectedConfigurations class. */ + public AzureMonitorSelectedConfigurations() { + } + /** * Get the configurationVersion property: The configuration version. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorTableConfiguration.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorTableConfiguration.java index 7671f439ca60..fdf51283a1dc 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorTableConfiguration.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AzureMonitorTableConfiguration.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The table configuration for the Log Analytics integration. */ @Fluent public final class AzureMonitorTableConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureMonitorTableConfiguration.class); - /* * The name. */ @JsonProperty(value = "name") private String name; + /** Creates an instance of AzureMonitorTableConfiguration class. */ + public AzureMonitorTableConfiguration() { + } + /** * Get the name property: The name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingMeters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingMeters.java index 141494adb11e..368f8f30d601 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingMeters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingMeters.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The billing meters. */ @Fluent public final class BillingMeters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingMeters.class); - /* * The virtual machine sizes. */ @@ -32,6 +28,10 @@ public final class BillingMeters { @JsonProperty(value = "unit") private String unit; + /** Creates an instance of BillingMeters class. */ + public BillingMeters() { + } + /** * Get the meterParameter property: The virtual machine sizes. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingResources.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingResources.java index a430a4fbaf02..b599931ce723 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingResources.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/BillingResources.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The billing resources. */ @Fluent public final class BillingResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingResources.class); - /* * The region or location. */ @@ -33,6 +29,10 @@ public final class BillingResources { @JsonProperty(value = "diskBillingMeters") private List diskBillingMeters; + /** Creates an instance of BillingResources class. */ + public BillingResources() { + } + /** * Get the region property: The region or location. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClientGroupInfo.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClientGroupInfo.java index 223fb36c07e2..f75c3d840738 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClientGroupInfo.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClientGroupInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The information of AAD security group. */ @Fluent public final class ClientGroupInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientGroupInfo.class); - /* * The AAD security group name. */ @@ -26,6 +22,10 @@ public final class ClientGroupInfo { @JsonProperty(value = "groupId") private String groupId; + /** Creates an instance of ClientGroupInfo class. */ + public ClientGroupInfo() { + } + /** * Get the groupName property: The AAD security group name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Cluster.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Cluster.java index fb03482ffb3b..301d330e5ec2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Cluster.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Cluster.java @@ -98,6 +98,13 @@ public interface Cluster { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.hdinsight.fluent.models.ClusterInner object. * @@ -284,22 +291,22 @@ interface WithTags { /** * Gets the gateway settings for the specified cluster. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the gateway settings for the specified cluster. + * @return the gateway settings for the specified cluster along with {@link Response}. */ - GatewaySettings getGatewaySettings(); + Response getGatewaySettingsWithResponse(Context context); /** * Gets the gateway settings for the specified cluster. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the gateway settings for the specified cluster. */ - Response getGatewaySettingsWithResponse(Context context); + GatewaySettings getGatewaySettings(); /** * Configures the gateway settings on the specified cluster. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateParametersExtended.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateParametersExtended.java index ac474b749709..ea48678dc56f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateParametersExtended.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateParametersExtended.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,8 +13,6 @@ /** The CreateCluster request parameters. */ @Fluent public class ClusterCreateParametersExtended { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterCreateParametersExtended.class); - /* * The location of the cluster. */ @@ -48,6 +44,10 @@ public class ClusterCreateParametersExtended { @JsonProperty(value = "identity") private ClusterIdentity identity; + /** Creates an instance of ClusterCreateParametersExtended class. */ + public ClusterCreateParametersExtended() { + } + /** * Get the location property: The location of the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateProperties.java index 86e336dcb641..68270cbf5093 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The cluster create parameters. */ @Fluent public final class ClusterCreateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterCreateProperties.class); - /* * The version of the cluster. */ @@ -99,6 +95,10 @@ public final class ClusterCreateProperties { @JsonProperty(value = "privateLinkConfigurations") private List privateLinkConfigurations; + /** Creates an instance of ClusterCreateProperties class. */ + public ClusterCreateProperties() { + } + /** * Get the clusterVersion property: The version of the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateRequestValidationParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateRequestValidationParameters.java index 6f8a980c158f..07e525aa26a2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateRequestValidationParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterCreateRequestValidationParameters.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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; import java.util.Map; @@ -14,8 +12,6 @@ /** The cluster create request specification. */ @Fluent public final class ClusterCreateRequestValidationParameters extends ClusterCreateParametersExtended { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterCreateRequestValidationParameters.class); - /* * The cluster name. */ @@ -40,6 +36,10 @@ public final class ClusterCreateRequestValidationParameters extends ClusterCreat @JsonProperty(value = "fetchAaddsResource") private Boolean fetchAaddsResource; + /** Creates an instance of ClusterCreateRequestValidationParameters class. */ + public ClusterCreateRequestValidationParameters() { + } + /** * Get the name property: The cluster name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDefinition.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDefinition.java index 9ef304c68335..1f3efdca2cbd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDefinition.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDefinition.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** The cluster definition. */ @Fluent public final class ClusterDefinition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterDefinition.class); - /* * The link to the blueprint. */ @@ -41,6 +37,10 @@ public final class ClusterDefinition { @JsonProperty(value = "configurations") private Object configurations; + /** Creates an instance of ClusterDefinition class. */ + public ClusterDefinition() { + } + /** * Get the blueprint property: The link to the blueprint. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDiskEncryptionParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDiskEncryptionParameters.java index 76ee71f3cb69..0373e1f5113d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDiskEncryptionParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterDiskEncryptionParameters.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.hdinsight.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; /** The Disk Encryption Cluster request parameters. */ @Fluent public final class ClusterDiskEncryptionParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterDiskEncryptionParameters.class); - /* - * Base key vault URI where the customers key is located eg. - * https://myvault.vault.azure.net + * Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net */ @JsonProperty(value = "vaultUri") private String vaultUri; @@ -33,6 +28,10 @@ public final class ClusterDiskEncryptionParameters { @JsonProperty(value = "keyVersion") private String keyVersion; + /** Creates an instance of ClusterDiskEncryptionParameters class. */ + public ClusterDiskEncryptionParameters() { + } + /** * Get the vaultUri property: Base key vault URI where the customers key is located eg. * https://myvault.vault.azure.net. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterGetProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterGetProperties.java index 4ed7340e3df4..9f46fa093d9e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterGetProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterGetProperties.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of cluster. */ @Fluent public final class ClusterGetProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterGetProperties.class); - /* * The version of the cluster. */ @@ -160,6 +157,10 @@ public final class ClusterGetProperties { @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; + /** Creates an instance of ClusterGetProperties class. */ + public ClusterGetProperties() { + } + /** * Get the clusterVersion property: The version of the cluster. * @@ -638,7 +639,7 @@ public List privateEndpointConnections() { */ public void validate() { if (clusterDefinition() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property clusterDefinition in model ClusterGetProperties")); @@ -688,4 +689,6 @@ public void validate() { privateEndpointConnections().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterGetProperties.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterIdentity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterIdentity.java index 5945d055b6b6..7ba08345e9b5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterIdentity.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterIdentity.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,39 +12,38 @@ /** Identity for the cluster. */ @Fluent public class ClusterIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterIdentity.class); - /* - * The principal id of cluster identity. This property will only be - * provided for a system assigned identity. + * The principal id of cluster identity. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* - * The tenant id associated with the cluster. This property will only be - * provided for a system assigned identity. + * The tenant id associated with the cluster. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* - * The type of identity used for the cluster. The type 'SystemAssigned, - * UserAssigned' includes both an implicitly created identity and a set of - * user assigned identities. + * The type of identity used for the cluster. The type 'SystemAssigned, UserAssigned' includes both an implicitly + * created identity and a set of user assigned identities. */ @JsonProperty(value = "type") private ResourceIdentityType type; /* - * The list of user identities associated with the cluster. The user - * identity dictionary key references will be ARM resource ids in the form: + * The list of user identities associated with the cluster. The user identity dictionary key references will be ARM + * resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of ClusterIdentity class. */ + public ClusterIdentity() { + } + /** * Get the principalId property: The principal id of cluster identity. This property will only be provided for a * system assigned identity. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterListResult.java index a6a73b4d6bcf..930555af80ad 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hdinsight.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.ClusterInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The List Cluster operation response. */ @Fluent public final class ClusterListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterListResult.class); - /* * The list of Clusters. */ @@ -28,6 +24,10 @@ public final class ClusterListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ClusterListResult class. */ + public ClusterListResult() { + } + /** * Get the value property: The list of Clusters. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterMonitoringRequest.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterMonitoringRequest.java index 27b97cc20b37..526cce7fb449 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterMonitoringRequest.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterMonitoringRequest.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The cluster monitor parameters. */ @Fluent public final class ClusterMonitoringRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterMonitoringRequest.class); - /* * The cluster monitor workspace ID. */ @@ -26,6 +22,10 @@ public final class ClusterMonitoringRequest { @JsonProperty(value = "primaryKey") private String primaryKey; + /** Creates an instance of ClusterMonitoringRequest class. */ + public ClusterMonitoringRequest() { + } + /** * Get the workspaceId property: The cluster monitor workspace ID. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterPatchParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterPatchParameters.java index 4a5fc4c19ba4..1cd35faa7a7a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterPatchParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterPatchParameters.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** The PatchCluster request parameters. */ @Fluent public final class ClusterPatchParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPatchParameters.class); - /* * The resource tags. */ @@ -23,6 +19,10 @@ public final class ClusterPatchParameters { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of ClusterPatchParameters class. */ + public ClusterPatchParameters() { + } + /** * Get the tags property: The resource tags. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterResizeParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterResizeParameters.java index 20ed06af73ac..3e46bacb432a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterResizeParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ClusterResizeParameters.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The Resize Cluster request parameters. */ @Fluent public final class ClusterResizeParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterResizeParameters.class); - /* * The target instance count for the operation. */ @JsonProperty(value = "targetInstanceCount") private Integer targetInstanceCount; + /** Creates an instance of ClusterResizeParameters class. */ + public ClusterResizeParameters() { + } + /** * Get the targetInstanceCount property: The target instance count for the operation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Clusters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Clusters.java index f10a0adad57f..4b60694b8abc 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Clusters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Clusters.java @@ -38,25 +38,25 @@ public interface Clusters { * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specified cluster. + * @return the specified cluster along with {@link Response}. */ - Cluster getByResourceGroup(String resourceGroupName, String clusterName); + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); /** * Gets the specified cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specified cluster. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); + Cluster getByResourceGroup(String resourceGroupName, String clusterName); /** * Lists the HDInsight clusters in a resource group. @@ -65,7 +65,7 @@ public interface Clusters { * @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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -77,7 +77,7 @@ public interface Clusters { * @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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -154,7 +154,7 @@ void updateAutoScaleConfiguration( * * @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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -165,7 +165,7 @@ void updateAutoScaleConfiguration( * @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 List Cluster operation response. + * @return the List Cluster operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -201,26 +201,26 @@ void rotateDiskEncryptionKey( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gateway settings for the specified cluster. + * @return the gateway settings for the specified cluster along with {@link Response}. */ - GatewaySettings getGatewaySettings(String resourceGroupName, String clusterName); + Response getGatewaySettingsWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets the gateway settings for the specified cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gateway settings for the specified cluster. */ - Response getGatewaySettingsWithResponse( - String resourceGroupName, String clusterName, Context context); + GatewaySettings getGatewaySettings(String resourceGroupName, String clusterName); /** * Configures the gateway settings on the specified cluster. @@ -255,12 +255,14 @@ void updateGatewaySettings( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the azure async operation response. + * @return the azure async operation response along with {@link Response}. */ - AsyncOperationResult getAzureAsyncOperationStatus(String resourceGroupName, String clusterName, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context); /** * The the async operation status. @@ -268,14 +270,12 @@ void updateGatewaySettings( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the azure async operation response. */ - Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context); + AsyncOperationResult getAzureAsyncOperationStatus(String resourceGroupName, String clusterName, String operationId); /** * Updates the cluster identity certificate. @@ -340,7 +340,7 @@ void executeScriptActions( * @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 specified cluster. + * @return the specified cluster along with {@link Response}. */ Cluster getById(String id); @@ -352,7 +352,7 @@ void executeScriptActions( * @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 specified cluster. + * @return the specified cluster along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeIsolationProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeIsolationProperties.java index 30b1b17d3023..75c5c5235e60 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeIsolationProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeIsolationProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The compute isolation properties. */ @Fluent public final class ComputeIsolationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeIsolationProperties.class); - /* * The flag indicates whether enable compute isolation or not. */ @@ -26,6 +22,10 @@ public final class ComputeIsolationProperties { @JsonProperty(value = "hostSku") private String hostSku; + /** Creates an instance of ComputeIsolationProperties class. */ + public ComputeIsolationProperties() { + } + /** * Get the enableComputeIsolation property: The flag indicates whether enable compute isolation or not. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeProfile.java index 855915af2dfe..b3b554da2f96 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ComputeProfile.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.hdinsight.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; /** Describes the compute profile. */ @Fluent public final class ComputeProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeProfile.class); - /* * The list of roles in the cluster. */ @JsonProperty(value = "roles") private List roles; + /** Creates an instance of ComputeProfile class. */ + public ComputeProfile() { + } + /** * Get the roles property: The list of roles in the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Configurations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Configurations.java index 58ce2acc9b14..31835afc2ba7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Configurations.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Configurations.java @@ -15,25 +15,25 @@ public interface Configurations { * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 all configuration information for an HDI cluster. + * @return all configuration information for an HDI cluster along with {@link Response}. */ - ClusterConfigurations list(String resourceGroupName, String clusterName); + Response listWithResponse(String resourceGroupName, String clusterName, Context context); /** * Gets all configuration information for an HDI cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 all configuration information for an HDI cluster. */ - Response listWithResponse(String resourceGroupName, String clusterName, Context context); + ClusterConfigurations list(String resourceGroupName, String clusterName); /** * Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings @@ -76,12 +76,15 @@ void update( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the configuration object for the specified configuration for the specified cluster. + * @return the configuration object for the specified configuration for the specified cluster along with {@link + * Response}. */ - Map get(String resourceGroupName, String clusterName, String configurationName); + Response> getWithResponse( + String resourceGroupName, String clusterName, String configurationName, Context context); /** * The configuration object for the specified cluster. This API is not recommended and might be removed in the @@ -90,12 +93,10 @@ void update( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param configurationName The name of the cluster configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration object for the specified configuration for the specified cluster. */ - Response> getWithResponse( - String resourceGroupName, String clusterName, String configurationName, Context context); + Map get(String resourceGroupName, String clusterName, String configurationName); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ConnectivityEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ConnectivityEndpoint.java index 137797060b56..b558c33ae54b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ConnectivityEndpoint.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ConnectivityEndpoint.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The connectivity properties. */ @Fluent public final class ConnectivityEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectivityEndpoint.class); - /* * The name of the endpoint. */ @@ -44,6 +40,10 @@ public final class ConnectivityEndpoint { @JsonProperty(value = "privateIPAddress") private String privateIpAddress; + /** Creates an instance of ConnectivityEndpoint class. */ + public ConnectivityEndpoint() { + } + /** * Get the name property: The name of the endpoint. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DataDisksGroups.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DataDisksGroups.java index ae3cd805d367..57aa881823fe 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DataDisksGroups.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DataDisksGroups.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The data disks groups for the role. */ @Fluent public final class DataDisksGroups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataDisksGroups.class); - /* * The number of disks per node. */ @@ -32,6 +28,10 @@ public final class DataDisksGroups { @JsonProperty(value = "diskSizeGB", access = JsonProperty.Access.WRITE_ONLY) private Integer diskSizeGB; + /** Creates an instance of DataDisksGroups class. */ + public DataDisksGroups() { + } + /** * Get the disksPerNode property: The number of disks per node. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DaysOfWeek.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DaysOfWeek.java index 44516217ec20..0813edaabeaf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DaysOfWeek.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DaysOfWeek.java @@ -42,7 +42,11 @@ public static DaysOfWeek fromString(String name) { return fromString(name, DaysOfWeek.class); } - /** @return known DaysOfWeek values. */ + /** + * Gets known DaysOfWeek values. + * + * @return known DaysOfWeek values. + */ public static Collection values() { return values(DaysOfWeek.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Dimension.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Dimension.java index 80fe968bc75a..bc9ee971cd68 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Dimension.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Dimension.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The definition of Dimension. */ @Fluent public final class Dimension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dimension.class); - /* * The name of the dimension. */ @@ -33,12 +29,15 @@ public final class Dimension { private String internalName; /* - * The flag indicates whether the metric will be exported for shoebox or - * not. + * The flag indicates whether the metric will be exported for shoebox or not. */ @JsonProperty(value = "toBeExportedForShoebox") private Boolean toBeExportedForShoebox; + /** Creates an instance of Dimension class. */ + public Dimension() { + } + /** * Get the name property: The name of the dimension. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java index 96026ae29d5c..f42eb8f0d5d6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DirectoryType. */ +/** The directory type. */ public final class DirectoryType extends ExpandableStringEnum { /** Static value ActiveDirectory for DirectoryType. */ public static final DirectoryType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); @@ -24,7 +24,11 @@ public static DirectoryType fromString(String name) { return fromString(name, DirectoryType.class); } - /** @return known DirectoryType values. */ + /** + * Gets known DirectoryType values. + * + * @return known DirectoryType values. + */ public static Collection values() { return values(DirectoryType.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskBillingMeters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskBillingMeters.java index 3fe9ba4dcfda..14af1b76f5d2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskBillingMeters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskBillingMeters.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The disk billing meters. */ @Fluent public final class DiskBillingMeters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskBillingMeters.class); - /* * The managed disk meter guid. */ @@ -32,6 +28,10 @@ public final class DiskBillingMeters { @JsonProperty(value = "tier") private Tier tier; + /** Creates an instance of DiskBillingMeters class. */ + public DiskBillingMeters() { + } + /** * Get the diskRpMeter property: The managed disk meter guid. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskEncryptionProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskEncryptionProperties.java index 662cd59107fc..ec57c13629b9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskEncryptionProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DiskEncryptionProperties.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.hdinsight.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; /** The disk encryption properties. */ @Fluent public final class DiskEncryptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskEncryptionProperties.class); - /* - * Base key vault URI where the customers key is located eg. - * https://myvault.vault.azure.net + * Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net */ @JsonProperty(value = "vaultUri") private String vaultUri; @@ -51,6 +46,10 @@ public final class DiskEncryptionProperties { @JsonProperty(value = "encryptionAtHost") private Boolean encryptionAtHost; + /** Creates an instance of DiskEncryptionProperties class. */ + public DiskEncryptionProperties() { + } + /** * Get the vaultUri property: Base key vault URI where the customers key is located eg. * https://myvault.vault.azure.net. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/EncryptionInTransitProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/EncryptionInTransitProperties.java index 7a8521c16532..efa2100c4e05 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/EncryptionInTransitProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/EncryptionInTransitProperties.java @@ -5,22 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The encryption-in-transit properties. */ @Fluent public final class EncryptionInTransitProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionInTransitProperties.class); - /* - * Indicates whether or not inter cluster node communication is encrypted - * in transit. + * Indicates whether or not inter cluster node communication is encrypted in transit. */ @JsonProperty(value = "isEncryptionInTransitEnabled") private Boolean isEncryptionInTransitEnabled; + /** Creates an instance of EncryptionInTransitProperties class. */ + public EncryptionInTransitProperties() { + } + /** * Get the isEncryptionInTransitEnabled property: Indicates whether or not inter cluster node communication is * encrypted in transit. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Errors.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Errors.java index 05dab5b370f5..f0589736d3de 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Errors.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Errors.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The error message associated with the cluster creation. */ @Fluent public final class Errors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Errors.class); - /* * The error code. */ @@ -26,6 +22,10 @@ public final class Errors { @JsonProperty(value = "message") private String message; + /** Creates an instance of Errors class. */ + public Errors() { + } + /** * Get the code property: The error code. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExcludedServicesConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExcludedServicesConfig.java index 45cba1d99941..88a4b05a324c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExcludedServicesConfig.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExcludedServicesConfig.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The configuration that services will be excluded when creating cluster. */ @Fluent public final class ExcludedServicesConfig { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExcludedServicesConfig.class); - /* * The config id of excluded services. */ @@ -26,6 +22,10 @@ public final class ExcludedServicesConfig { @JsonProperty(value = "excludedServicesList") private String excludedServicesList; + /** Creates an instance of ExcludedServicesConfig class. */ + public ExcludedServicesConfig() { + } + /** * Get the excludedServicesConfigId property: The config id of excluded services. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExecuteScriptActionParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExecuteScriptActionParameters.java index b628b28c87cc..fd681341f936 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExecuteScriptActionParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ExecuteScriptActionParameters.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The parameters for the script actions to execute on a running cluster. */ @Fluent public final class ExecuteScriptActionParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExecuteScriptActionParameters.class); - /* * The list of run time script actions. */ @@ -27,6 +23,10 @@ public final class ExecuteScriptActionParameters { @JsonProperty(value = "persistOnSuccess", required = true) private boolean persistOnSuccess; + /** Creates an instance of ExecuteScriptActionParameters class. */ + public ExecuteScriptActionParameters() { + } + /** * Get the scriptActions property: The list of run time script actions. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extension.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extension.java index cf7149708c05..6467014ea1bb 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extension.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extension.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** Cluster monitoring extensions. */ @Fluent public final class Extension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Extension.class); - /* * The workspace ID for the cluster monitoring extension. */ @@ -26,6 +22,10 @@ public final class Extension { @JsonProperty(value = "primaryKey") private String primaryKey; + /** Creates an instance of Extension class. */ + public Extension() { + } + /** * Get the workspaceId property: The workspace ID for the cluster monitoring extension. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extensions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extensions.java index bec4d543f0c3..60522f822a37 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extensions.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Extensions.java @@ -40,26 +40,26 @@ void enableMonitoring( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Operations Management Suite (OMS) on the HDInsight cluster. + * @return the status of Operations Management Suite (OMS) on the HDInsight cluster along with {@link Response}. */ - ClusterMonitoringResponse getMonitoringStatus(String resourceGroupName, String clusterName); + Response getMonitoringStatusWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets the status of Operations Management Suite (OMS) on the HDInsight cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Operations Management Suite (OMS) on the HDInsight cluster. */ - Response getMonitoringStatusWithResponse( - String resourceGroupName, String clusterName, Context context); + ClusterMonitoringResponse getMonitoringStatus(String resourceGroupName, String clusterName); /** * Disables the Operations Management Suite (OMS) on the HDInsight cluster. @@ -115,26 +115,26 @@ void enableAzureMonitor( * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Azure Monitor on the HDInsight cluster. + * @return the status of Azure Monitor on the HDInsight cluster along with {@link Response}. */ - AzureMonitorResponse getAzureMonitorStatus(String resourceGroupName, String clusterName); + Response getAzureMonitorStatusWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets the status of Azure Monitor on the HDInsight cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 status of Azure Monitor on the HDInsight cluster. */ - Response getAzureMonitorStatusWithResponse( - String resourceGroupName, String clusterName, Context context); + AzureMonitorResponse getAzureMonitorStatus(String resourceGroupName, String clusterName); /** * Disables the Azure Monitor on the HDInsight cluster. @@ -193,12 +193,14 @@ void create( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the extension properties for the specified HDInsight cluster extension. + * @return the extension properties for the specified HDInsight cluster extension along with {@link Response}. */ - ClusterMonitoringResponse get(String resourceGroupName, String clusterName, String extensionName); + Response getWithResponse( + String resourceGroupName, String clusterName, String extensionName, Context context); /** * Gets the extension properties for the specified HDInsight cluster extension. @@ -206,14 +208,12 @@ void create( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the extension properties for the specified HDInsight cluster extension. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String extensionName, Context context); + ClusterMonitoringResponse get(String resourceGroupName, String clusterName, String extensionName); /** * Deletes the specified extension for HDInsight cluster. @@ -247,13 +247,14 @@ Response getWithResponse( * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ - AsyncOperationResult getAzureAsyncOperationStatus( - String resourceGroupName, String clusterName, String extensionName, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String extensionName, String operationId, Context context); /** * Gets the async operation status. @@ -262,12 +263,11 @@ AsyncOperationResult getAzureAsyncOperationStatus( * @param clusterName The name of the cluster. * @param extensionName The name of the cluster extension. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ - Response getAzureAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String extensionName, String operationId, Context context); + AsyncOperationResult getAzureAsyncOperationStatus( + String resourceGroupName, String clusterName, String extensionName, String operationId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java index ea6c22f6188b..fc668b9f7344 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FilterMode. */ +/** The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. */ public final class FilterMode extends ExpandableStringEnum { /** Static value Exclude for FilterMode. */ public static final FilterMode EXCLUDE = fromString("Exclude"); @@ -33,7 +33,11 @@ public static FilterMode fromString(String name) { return fromString(name, FilterMode.class); } - /** @return known FilterMode values. */ + /** + * Gets known FilterMode values. + * + * @return known FilterMode values. + */ public static Collection values() { return values(FilterMode.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java index 31651588f45e..70bce5fbe10f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HDInsightClusterProvisioningState. */ +/** The provisioning state, which only appears in the response. */ public final class HDInsightClusterProvisioningState extends ExpandableStringEnum { /** Static value InProgress for HDInsightClusterProvisioningState. */ public static final HDInsightClusterProvisioningState IN_PROGRESS = fromString("InProgress"); @@ -36,7 +36,11 @@ public static HDInsightClusterProvisioningState fromString(String name) { return fromString(name, HDInsightClusterProvisioningState.class); } - /** @return known HDInsightClusterProvisioningState values. */ + /** + * Gets known HDInsightClusterProvisioningState values. + * + * @return known HDInsightClusterProvisioningState values. + */ public static Collection values() { return values(HDInsightClusterProvisioningState.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HardwareProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HardwareProfile.java index 31fbe459db33..89901b2c3316 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HardwareProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HardwareProfile.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The hardware profile. */ @Fluent public final class HardwareProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HardwareProfile.class); - /* * The size of the VM */ @JsonProperty(value = "vmSize") private String vmSize; + /** Creates an instance of HardwareProfile class. */ + public HardwareProfile() { + } + /** * Get the vmSize property: The size of the VM. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/IpConfiguration.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/IpConfiguration.java index e09d0a35be03..e5272cd7380c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/IpConfiguration.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/IpConfiguration.java @@ -7,14 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.IpConfigurationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The ip configurations for the private link service. */ @Fluent public final class IpConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpConfiguration.class); - /* * The private link IP configuration id. */ @@ -39,6 +36,10 @@ public final class IpConfiguration { @JsonProperty(value = "properties") private IpConfigurationProperties innerProperties; + /** Creates an instance of IpConfiguration class. */ + public IpConfiguration() { + } + /** * Get the id property: The private link IP configuration id. * @@ -195,7 +196,7 @@ public IpConfiguration withSubnet(ResourceId subnet) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model IpConfiguration")); } @@ -203,4 +204,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IpConfiguration.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java index 013bc7eb299b..ed04a1b95fcd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JsonWebKeyEncryptionAlgorithm. */ +/** Algorithm identifier for encryption, default RSA-OAEP. */ public final class JsonWebKeyEncryptionAlgorithm extends ExpandableStringEnum { /** Static value RSA-OAEP for JsonWebKeyEncryptionAlgorithm. */ public static final JsonWebKeyEncryptionAlgorithm RSA_OAEP = fromString("RSA-OAEP"); @@ -30,7 +30,11 @@ public static JsonWebKeyEncryptionAlgorithm fromString(String name) { return fromString(name, JsonWebKeyEncryptionAlgorithm.class); } - /** @return known JsonWebKeyEncryptionAlgorithm values. */ + /** + * Gets known JsonWebKeyEncryptionAlgorithm values. + * + * @return known JsonWebKeyEncryptionAlgorithm values. + */ public static Collection values() { return values(JsonWebKeyEncryptionAlgorithm.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/KafkaRestProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/KafkaRestProperties.java index 65b37b1c9bf6..5a7dc4d30473 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/KafkaRestProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/KafkaRestProperties.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** The kafka rest proxy configuration which contains AAD security group information. */ @Fluent public final class KafkaRestProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KafkaRestProperties.class); - /* * The information of AAD security group. */ @@ -29,6 +25,10 @@ public final class KafkaRestProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map configurationOverride; + /** Creates an instance of KafkaRestProperties class. */ + public KafkaRestProperties() { + } + /** * Get the clientGroupInfo property: The information of AAD security group. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LinuxOperatingSystemProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LinuxOperatingSystemProfile.java index e5621be8aaf4..b996f95c626b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LinuxOperatingSystemProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LinuxOperatingSystemProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The ssh username, password, and ssh public key. */ @Fluent public final class LinuxOperatingSystemProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LinuxOperatingSystemProfile.class); - /* * The username. */ @@ -32,6 +28,10 @@ public final class LinuxOperatingSystemProfile { @JsonProperty(value = "sshProfile") private SshProfile sshProfile; + /** Creates an instance of LinuxOperatingSystemProfile class. */ + public LinuxOperatingSystemProfile() { + } + /** * Get the username property: The username. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LocalizedName.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LocalizedName.java index 7eda7aae7644..b6782644f839 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LocalizedName.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/LocalizedName.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The details about the localizable name of a type of usage. */ @Fluent public final class LocalizedName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LocalizedName.class); - /* * The name of the used resource. */ @@ -26,6 +22,10 @@ public final class LocalizedName { @JsonProperty(value = "localizedValue") private String localizedValue; + /** Creates an instance of LocalizedName class. */ + public LocalizedName() { + } + /** * Get the value property: The name of the used resource. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Locations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Locations.java index 26a25b9ef0f8..0b91f272743d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Locations.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Locations.java @@ -13,148 +13,149 @@ public interface Locations { * Gets the capabilities for the specified location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the capabilities for the specified location. + * @return the capabilities for the specified location along with {@link Response}. */ - CapabilitiesResult getCapabilities(String location); + Response getCapabilitiesWithResponse(String location, Context context); /** * Gets the capabilities for the specified location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the capabilities for the specified location. */ - Response getCapabilitiesWithResponse(String location, Context context); + CapabilitiesResult getCapabilities(String location); /** * Lists the usages for the specified location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional usages for a subscription. + * @return the response for the operation to get regional usages for a subscription along with {@link Response}. */ - UsagesListResult listUsages(String location); + Response listUsagesWithResponse(String location, Context context); /** * Lists the usages for the specified location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response for the operation to get regional usages for a subscription. */ - Response listUsagesWithResponse(String location, Context context); + UsagesListResult listUsages(String location); /** * Lists the billingSpecs for the specified subscription and location. * * @param location The Azure location (region) for which to make the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for the operation to get regional billingSpecs for a subscription. + * @return the response for the operation to get regional billingSpecs for a subscription along with {@link + * Response}. */ - BillingResponseListResult listBillingSpecs(String location); + Response listBillingSpecsWithResponse(String location, Context context); /** * Lists the billingSpecs for the specified subscription and location. * * @param location The Azure location (region) for which to make the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response for the operation to get regional billingSpecs for a subscription. */ - Response listBillingSpecsWithResponse(String location, Context context); + BillingResponseListResult listBillingSpecs(String location); /** * Get the async operation status. * * @param location The Azure location (region) for which to make the request. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ - AsyncOperationResult getAzureAsyncOperationStatus(String location, String operationId); + Response getAzureAsyncOperationStatusWithResponse( + String location, String operationId, Context context); /** * Get the async operation status. * * @param location The Azure location (region) for which to make the request. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ - Response getAzureAsyncOperationStatusWithResponse( - String location, String operationId, Context context); + AsyncOperationResult getAzureAsyncOperationStatus(String location, String operationId); /** * Check the cluster name is available or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The request spec of checking name availability. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response spec of checking name availability. + * @return the response spec of checking name availability along with {@link Response}. */ - NameAvailabilityCheckResult checkNameAvailability( - String location, NameAvailabilityCheckRequestParameters parameters); + Response checkNameAvailabilityWithResponse( + String location, NameAvailabilityCheckRequestParameters parameters, Context context); /** * Check the cluster name is available or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The request spec of checking name availability. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response spec of checking name availability. */ - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityCheckRequestParameters parameters, Context context); + NameAvailabilityCheckResult checkNameAvailability( + String location, NameAvailabilityCheckRequestParameters parameters); /** * Validate the cluster create request spec is valid or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The cluster create request specification. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of cluster create request validation. + * @return the response of cluster create request validation along with {@link Response}. */ - ClusterCreateValidationResult validateClusterCreateRequest( - String location, ClusterCreateRequestValidationParameters parameters); + Response validateClusterCreateRequestWithResponse( + String location, ClusterCreateRequestValidationParameters parameters, Context context); /** * Validate the cluster create request spec is valid or not. * * @param location The Azure location (region) for which to make the request. * @param parameters The cluster create request specification. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of cluster create request validation. */ - Response validateClusterCreateRequestWithResponse( - String location, ClusterCreateRequestValidationParameters parameters, Context context); + ClusterCreateValidationResult validateClusterCreateRequest( + String location, ClusterCreateRequestValidationParameters parameters); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/MetricSpecifications.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/MetricSpecifications.java index da5a4cf9f7b8..e436554c74e5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/MetricSpecifications.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/MetricSpecifications.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The details of metric specifications. */ @Fluent public final class MetricSpecifications { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecifications.class); - /* * The name of the metric specification. */ @@ -117,6 +113,10 @@ public final class MetricSpecifications { @JsonProperty(value = "dimensions") private List dimensions; + /** Creates an instance of MetricSpecifications class. */ + public MetricSpecifications() { + } + /** * Get the name property: The name of the metric specification. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NameAvailabilityCheckRequestParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NameAvailabilityCheckRequestParameters.java index 2166c3eec7a5..f55afd7c6820 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NameAvailabilityCheckRequestParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NameAvailabilityCheckRequestParameters.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The request spec of checking name availability. */ @Fluent public final class NameAvailabilityCheckRequestParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityCheckRequestParameters.class); - /* * The resource name. */ @@ -26,6 +22,10 @@ public final class NameAvailabilityCheckRequestParameters { @JsonProperty(value = "type") private String type; + /** Creates an instance of NameAvailabilityCheckRequestParameters class. */ + public NameAvailabilityCheckRequestParameters() { + } + /** * Get the name property: The resource name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java index 33f9b74ada29..98e40cdd17c3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The network properties. */ @Fluent public final class NetworkProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkProperties.class); - /* * The direction for the resource provider connection. */ @@ -26,6 +22,10 @@ public final class NetworkProperties { @JsonProperty(value = "privateLink") private PrivateLink privateLink; + /** Creates an instance of NetworkProperties class. */ + public NetworkProperties() { + } + /** * Get the resourceProviderConnection property: The direction for the resource provider connection. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OSType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OSType.java index 1da246e86ffc..2c2620f5a575 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OSType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OSType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OSType. */ +/** The type of operating system. */ public final class OSType extends ExpandableStringEnum { /** Static value Windows for OSType. */ public static final OSType WINDOWS = fromString("Windows"); @@ -27,7 +27,11 @@ public static OSType fromString(String name) { return fromString(name, OSType.class); } - /** @return known OSType values. */ + /** + * Gets known OSType values. + * + * @return known OSType values. + */ public static Collection values() { return values(OSType.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationDisplay.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationDisplay.java index ffe486694303..53c50dd9251c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationDisplay.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The object that represents the operation. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * The service provider: Microsoft.HDInsight */ @@ -21,8 +17,7 @@ public final class OperationDisplay { private String provider; /* - * The resource on which the operation is performed: Cluster, Applications, - * etc. + * The resource on which the operation is performed: Cluster, Applications, etc. */ @JsonProperty(value = "resource") private String resource; @@ -39,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: The service provider: Microsoft.HDInsight. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationListResult.java index fb1754259704..d7969baf45bd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.hdinsight.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,11 +15,8 @@ */ @Fluent public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* - * The list of HDInsight operations supported by the HDInsight resource - * provider. + * The list of HDInsight operations supported by the HDInsight resource provider. */ @JsonProperty(value = "value") private List value; @@ -32,6 +27,10 @@ public final class OperationListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + /** * Get the value property: The list of HDInsight operations supported by the HDInsight resource provider. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationProperties.java index 895894293c36..2afea737d387 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OperationProperties.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The details of operation. */ @Fluent public final class OperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationProperties.class); - /* * The specification of the service. */ @JsonProperty(value = "serviceSpecification") private ServiceSpecification serviceSpecification; + /** Creates an instance of OperationProperties class. */ + public OperationProperties() { + } + /** * Get the serviceSpecification property: The specification of the service. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Operations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Operations.java index 8247e1426899..51aedaa07d7c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Operations.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight 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 result of the request to list HDInsight operations. + * @return result of the request to list HDInsight operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OsProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OsProfile.java index d3456a105047..fcd79670b637 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OsProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OsProfile.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The Linux operation systems profile. */ @Fluent public final class OsProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OsProfile.class); - /* * The Linux OS profile. */ @JsonProperty(value = "linuxOperatingSystemProfile") private LinuxOperatingSystemProfile linuxOperatingSystemProfile; + /** Creates an instance of OsProfile class. */ + public OsProfile() { + } + /** * Get the linuxOperatingSystemProfile property: The Linux OS profile. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpoint.java index b3750f18247a..b6dfe2bb6170 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpoint.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpoint.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The private endpoint. */ @Fluent public final class PrivateEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); - /* * The private endpoint id. */ @JsonProperty(value = "id") private String id; + /** Creates an instance of PrivateEndpoint class. */ + public PrivateEndpoint() { + } + /** * Get the id property: The private endpoint id. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnection.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnection.java index 4d8e19539dda..a976f13deea7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnection.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnection.java @@ -66,6 +66,13 @@ public interface PrivateEndpointConnection { */ PrivateEndpointConnectionProvisioningState provisioningState(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.hdinsight.fluent.models.PrivateEndpointConnectionInner object. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionListResult.java index be0044ffb008..2d27c9e5767c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hdinsight.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list private endpoint connections response. */ @Fluent public final class PrivateEndpointConnectionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResult.class); - /* * The list of private endpoint connections. */ @@ -28,6 +24,10 @@ public final class PrivateEndpointConnectionListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of PrivateEndpointConnectionListResult class. */ + public PrivateEndpointConnectionListResult() { + } + /** * Get the value property: The list of private endpoint connections. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java index a560ebedc329..5e831607d1a6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateEndpointConnectionProvisioningState. */ +/** The provisioning state, which only appears in the response. */ public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { /** Static value InProgress for PrivateEndpointConnectionProvisioningState. */ @@ -40,7 +40,11 @@ public static PrivateEndpointConnectionProvisioningState fromString(String name) return fromString(name, PrivateEndpointConnectionProvisioningState.class); } - /** @return known PrivateEndpointConnectionProvisioningState values. */ + /** + * Gets known PrivateEndpointConnectionProvisioningState values. + * + * @return known PrivateEndpointConnectionProvisioningState values. + */ public static Collection values() { return values(PrivateEndpointConnectionProvisioningState.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnections.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnections.java index 8bb3597d4ceb..0ad3a1ed3c60 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnections.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnections.java @@ -18,7 +18,7 @@ public interface PrivateEndpointConnections { * @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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -31,7 +31,7 @@ public interface PrivateEndpointConnections { * @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 list private endpoint connections response. + * @return the list private endpoint connections response as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster( String resourceGroupName, String clusterName, Context context); @@ -42,12 +42,14 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specific private endpoint connection. + * @return the specific private endpoint connection along with {@link Response}. */ - PrivateEndpointConnection get(String resourceGroupName, String clusterName, String privateEndpointConnectionName); + Response getWithResponse( + String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); /** * Gets the specific private endpoint connection. @@ -55,14 +57,12 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specific private endpoint connection. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnection get(String resourceGroupName, String clusterName, String privateEndpointConnectionName); /** * Deletes the specific private endpoint connection. @@ -96,7 +96,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 the specific private endpoint connection. + * @return the specific private endpoint connection along with {@link Response}. */ PrivateEndpointConnection getById(String id); @@ -108,7 +108,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 the specific private endpoint connection. + * @return the specific private endpoint connection along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java index a65824d565be..0c3067272037 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateIpAllocationMethod. */ +/** The method that private IP address is allocated. */ public final class PrivateIpAllocationMethod extends ExpandableStringEnum { /** Static value dynamic for PrivateIpAllocationMethod. */ public static final PrivateIpAllocationMethod DYNAMIC = fromString("dynamic"); @@ -27,7 +27,11 @@ public static PrivateIpAllocationMethod fromString(String name) { return fromString(name, PrivateIpAllocationMethod.class); } - /** @return known PrivateIpAllocationMethod values. */ + /** + * Gets known PrivateIpAllocationMethod values. + * + * @return known PrivateIpAllocationMethod values. + */ public static Collection values() { return values(PrivateIpAllocationMethod.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLink.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLink.java index e8080d4cafb0..62d44fa11138 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLink.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLink.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateLink. */ +/** Indicates whether or not private link is enabled. */ public final class PrivateLink extends ExpandableStringEnum { /** Static value Disabled for PrivateLink. */ public static final PrivateLink DISABLED = fromString("Disabled"); @@ -27,7 +27,11 @@ public static PrivateLink fromString(String name) { return fromString(name, PrivateLink.class); } - /** @return known PrivateLink values. */ + /** + * Gets known PrivateLink values. + * + * @return known PrivateLink values. + */ public static Collection values() { return values(PrivateLink.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfiguration.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfiguration.java index 78cf6006520e..5a43025a86f0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfiguration.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfiguration.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkConfigurationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The private link configuration. */ @Fluent public final class PrivateLinkConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkConfiguration.class); - /* * The private link configuration id. */ @@ -40,6 +37,10 @@ public final class PrivateLinkConfiguration { @JsonProperty(value = "properties", required = true) private PrivateLinkConfigurationProperties innerProperties = new PrivateLinkConfigurationProperties(); + /** Creates an instance of PrivateLinkConfiguration class. */ + public PrivateLinkConfiguration() { + } + /** * Get the id property: The private link configuration id. * @@ -152,12 +153,12 @@ public PrivateLinkConfiguration withIpConfigurations(List ipCon */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model PrivateLinkConfiguration")); } if (innerProperties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property innerProperties in model PrivateLinkConfiguration")); @@ -165,4 +166,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkConfiguration.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java index c622d11fd1be..6c6623de2625 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateLinkConfigurationProvisioningState. */ +/** The private link configuration provisioning state, which only appears in the response. */ public final class PrivateLinkConfigurationProvisioningState extends ExpandableStringEnum { /** Static value InProgress for PrivateLinkConfigurationProvisioningState. */ @@ -37,7 +37,11 @@ public static PrivateLinkConfigurationProvisioningState fromString(String name) return fromString(name, PrivateLinkConfigurationProvisioningState.class); } - /** @return known PrivateLinkConfigurationProvisioningState values. */ + /** + * Gets known PrivateLinkConfigurationProvisioningState values. + * + * @return known PrivateLinkConfigurationProvisioningState values. + */ public static Collection values() { return values(PrivateLinkConfigurationProvisioningState.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkResources.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkResources.java index 96a18304780a..1bded48ad89b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkResources.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkResources.java @@ -14,26 +14,26 @@ public interface PrivateLinkResources { * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private link resources. + * @return a list of private link resources along with {@link Response}. */ - PrivateLinkResourceListResult listByCluster(String resourceGroupName, String clusterName); + Response listByClusterWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Lists the private link resources in a HDInsight cluster. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private link resources. */ - Response listByClusterWithResponse( - String resourceGroupName, String clusterName, Context context); + PrivateLinkResourceListResult listByCluster(String resourceGroupName, String clusterName); /** * Gets the specific private link resource. @@ -41,12 +41,14 @@ Response listByClusterWithResponse( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specific private link resource. + * @return the specific private link resource along with {@link Response}. */ - PrivateLinkResource get(String resourceGroupName, String clusterName, String privateLinkResourceName); + Response getWithResponse( + String resourceGroupName, String clusterName, String privateLinkResourceName, Context context); /** * Gets the specific private link resource. @@ -54,12 +56,10 @@ Response listByClusterWithResponse( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param privateLinkResourceName The name of the private link resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specific private link resource. */ - Response getWithResponse( - String resourceGroupName, String clusterName, String privateLinkResourceName, Context context); + PrivateLinkResource get(String resourceGroupName, String clusterName, String privateLinkResourceName); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionState.java index 93ffab90b679..24a5ba06ec77 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionState.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; /** The private link service connection state. */ @Fluent public final class PrivateLinkServiceConnectionState { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); - /* * The concrete private link service connection. */ @@ -32,6 +29,10 @@ public final class PrivateLinkServiceConnectionState { @JsonProperty(value = "actionsRequired") private String actionsRequired; + /** Creates an instance of PrivateLinkServiceConnectionState class. */ + public PrivateLinkServiceConnectionState() { + } + /** * Get the status property: The concrete private link service connection. * @@ -99,10 +100,12 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi */ public void validate() { if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property status in model PrivateLinkServiceConnectionState")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkServiceConnectionState.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java index fbb8912bec91..4cb01aa82594 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateLinkServiceConnectionStatus. */ +/** The concrete private link service connection. */ public final class PrivateLinkServiceConnectionStatus extends ExpandableStringEnum { /** Static value Approved for PrivateLinkServiceConnectionStatus. */ public static final PrivateLinkServiceConnectionStatus APPROVED = fromString("Approved"); @@ -33,7 +33,11 @@ public static PrivateLinkServiceConnectionStatus fromString(String name) { return fromString(name, PrivateLinkServiceConnectionStatus.class); } - /** @return known PrivateLinkServiceConnectionStatus values. */ + /** + * Gets known PrivateLinkServiceConnectionStatus values. + * + * @return known PrivateLinkServiceConnectionStatus values. + */ public static Collection values() { return values(PrivateLinkServiceConnectionStatus.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaCapability.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaCapability.java index 7ded4a68db24..4099624317e4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaCapability.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaCapability.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The regional quota capability. */ @Fluent public final class QuotaCapability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaCapability.class); - /* * The number of cores used in the subscription. */ @@ -33,6 +29,10 @@ public final class QuotaCapability { @JsonProperty(value = "regionalQuotas") private List regionalQuotas; + /** Creates an instance of QuotaCapability class. */ + public QuotaCapability() { + } + /** * Get the coresUsed property: The number of cores used in the subscription. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaInfo.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaInfo.java index b98e41333aaa..39e3f4380783 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaInfo.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/QuotaInfo.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The quota properties for the cluster. */ @Fluent public final class QuotaInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaInfo.class); - /* * The cores used by the cluster. */ @JsonProperty(value = "coresUsed") private Integer coresUsed; + /** Creates an instance of QuotaInfo class. */ + public QuotaInfo() { + } + /** * Get the coresUsed property: The cores used by the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionalQuotaCapability.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionalQuotaCapability.java index ab4a21228c1b..cf2468883617 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionalQuotaCapability.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionalQuotaCapability.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The regional quota capacity. */ @Fluent public final class RegionalQuotaCapability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegionalQuotaCapability.class); - /* * The region name. */ @@ -32,6 +28,10 @@ public final class RegionalQuotaCapability { @JsonProperty(value = "coresAvailable") private Long coresAvailable; + /** Creates an instance of RegionalQuotaCapability class. */ + public RegionalQuotaCapability() { + } + /** * Get the regionName property: The region name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionsCapability.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionsCapability.java index e73fc2d5eedf..b77b337d3cc6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionsCapability.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RegionsCapability.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.hdinsight.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; /** The regions capability. */ @Fluent public final class RegionsCapability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegionsCapability.class); - /* * The list of region capabilities. */ @JsonProperty(value = "available") private List available; + /** Creates an instance of RegionsCapability class. */ + public RegionsCapability() { + } + /** * Get the available property: The list of region capabilities. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceId.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceId.java index d82c645ffc4b..10f17f6914aa 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceId.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceId.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The azure resource id. */ @Fluent public final class ResourceId { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceId.class); - /* * The azure resource id. */ @JsonProperty(value = "id") private String id; + /** Creates an instance of ResourceId class. */ + public ResourceId() { + } + /** * Get the id property: The azure resource id. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java index 6ce82742feb3..4f31b85f1c0d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ResourceIdentityType. */ +/** + * The type of identity used for the cluster. The type 'SystemAssigned, UserAssigned' includes both an implicitly + * created identity and a set of user assigned identities. + */ public final class ResourceIdentityType extends ExpandableStringEnum { /** Static value SystemAssigned for ResourceIdentityType. */ public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); @@ -33,7 +36,11 @@ public static ResourceIdentityType fromString(String name) { return fromString(name, ResourceIdentityType.class); } - /** @return known ResourceIdentityType values. */ + /** + * Gets known ResourceIdentityType values. + * + * @return known ResourceIdentityType values. + */ public static Collection values() { return values(ResourceIdentityType.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceProviderConnection.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceProviderConnection.java index 90cc76cb37ff..cf37d2f5ebab 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceProviderConnection.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceProviderConnection.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ResourceProviderConnection. */ +/** The direction for the resource provider connection. */ public final class ResourceProviderConnection extends ExpandableStringEnum { /** Static value Inbound for ResourceProviderConnection. */ public static final ResourceProviderConnection INBOUND = fromString("Inbound"); @@ -27,7 +27,11 @@ public static ResourceProviderConnection fromString(String name) { return fromString(name, ResourceProviderConnection.class); } - /** @return known ResourceProviderConnection values. */ + /** + * Gets known ResourceProviderConnection values. + * + * @return known ResourceProviderConnection values. + */ public static Collection values() { return values(ResourceProviderConnection.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Role.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Role.java index 20f97b543b02..a0c6c0992f1c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Role.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Role.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** Describes a role on the cluster. */ @Fluent public final class Role { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Role.class); - /* * The name of the role. */ @@ -81,6 +77,10 @@ public final class Role { @JsonProperty(value = "encryptDataDisks") private Boolean encryptDataDisks; + /** Creates an instance of Role class. */ + public Role() { + } + /** * Get the name property: The name of the role. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RoleName.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RoleName.java index 907030cbc1c1..d8e501666d89 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RoleName.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RoleName.java @@ -24,7 +24,11 @@ public static RoleName fromString(String name) { return fromString(name, RoleName.class); } - /** @return known RoleName values. */ + /** + * Gets known RoleName values. + * + * @return known RoleName values. + */ public static Collection values() { return values(RoleName.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RuntimeScriptAction.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RuntimeScriptAction.java index a4b241acc37b..2742fa7fe824 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RuntimeScriptAction.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/RuntimeScriptAction.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; /** Describes a script action on a running cluster. */ @Fluent public class RuntimeScriptAction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RuntimeScriptAction.class); - /* * The name of the script action. */ @@ -45,6 +42,10 @@ public class RuntimeScriptAction { @JsonProperty(value = "applicationName", access = JsonProperty.Access.WRITE_ONLY) private String applicationName; + /** Creates an instance of RuntimeScriptAction class. */ + public RuntimeScriptAction() { + } + /** * Get the name property: The name of the script action. * @@ -141,19 +142,21 @@ public String applicationName() { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model RuntimeScriptAction")); } if (uri() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property uri in model RuntimeScriptAction")); } if (roles() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property roles in model RuntimeScriptAction")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RuntimeScriptAction.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptAction.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptAction.java index d024aeb5b2de..599ed32173ec 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptAction.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptAction.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; /** Describes a script action on role on the cluster. */ @Fluent public final class ScriptAction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptAction.class); - /* * The name of the script action. */ @@ -32,6 +29,10 @@ public final class ScriptAction { @JsonProperty(value = "parameters", required = true) private String parameters; + /** Creates an instance of ScriptAction class. */ + public ScriptAction() { + } + /** * Get the name property: The name of the script action. * @@ -99,19 +100,21 @@ public ScriptAction withParameters(String parameters) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model ScriptAction")); } if (uri() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property uri in model ScriptAction")); } if (parameters() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property parameters in model ScriptAction")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptAction.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionHistoryList.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionHistoryList.java index 40b4220a6947..1e90f3a0c807 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionHistoryList.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionHistoryList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hdinsight.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list script execution history response. */ @Immutable public final class ScriptActionExecutionHistoryList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptActionExecutionHistoryList.class); - /* * The list of persisted script action details for the cluster. */ @@ -28,6 +24,10 @@ public final class ScriptActionExecutionHistoryList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ScriptActionExecutionHistoryList class. */ + public ScriptActionExecutionHistoryList() { + } + /** * Get the value property: The list of persisted script action details for the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionSummary.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionSummary.java index 6a66e42657a1..29b43c0ef999 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionSummary.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionExecutionSummary.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The execution summary of a script action. */ @Immutable public final class ScriptActionExecutionSummary { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptActionExecutionSummary.class); - /* * The status of script action execution. */ @@ -26,6 +22,10 @@ public final class ScriptActionExecutionSummary { @JsonProperty(value = "instanceCount", access = JsonProperty.Access.WRITE_ONLY) private Integer instanceCount; + /** Creates an instance of ScriptActionExecutionSummary class. */ + public ScriptActionExecutionSummary() { + } + /** * Get the status property: The status of script action execution. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActions.java index 4c1be6d2db4a..10383b833b7b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActions.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActions.java @@ -16,11 +16,13 @@ public interface ScriptActions { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptName The name of the script. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String clusterName, String scriptName); + Response deleteWithResponse(String resourceGroupName, String clusterName, String scriptName, Context context); /** * Deletes a specified persisted script action of the cluster. @@ -28,13 +30,11 @@ public interface ScriptActions { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptName The name of the script. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Response deleteWithResponse(String resourceGroupName, String clusterName, String scriptName, Context context); + void delete(String resourceGroupName, String clusterName, String scriptName); /** * Lists all the persisted script actions for the specified cluster. @@ -44,7 +44,7 @@ public interface ScriptActions { * @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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -57,7 +57,7 @@ public interface ScriptActions { * @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 persisted script action for the cluster. + * @return the persisted script action for the cluster as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster( String resourceGroupName, String clusterName, Context context); @@ -68,13 +68,14 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the script execution detail for the given script execution ID. + * @return the script execution detail for the given script execution ID along with {@link Response}. */ - RuntimeScriptActionDetail getExecutionDetail( - String resourceGroupName, String clusterName, String scriptExecutionId); + Response getExecutionDetailWithResponse( + String resourceGroupName, String clusterName, String scriptExecutionId, Context context); /** * Gets the script execution detail for the given script execution ID. @@ -82,14 +83,13 @@ RuntimeScriptActionDetail getExecutionDetail( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the script execution detail for the given script execution ID. */ - Response getExecutionDetailWithResponse( - String resourceGroupName, String clusterName, String scriptExecutionId, Context context); + RuntimeScriptActionDetail getExecutionDetail( + String resourceGroupName, String clusterName, String scriptExecutionId); /** * Gets the async operation status of execution operation. @@ -97,13 +97,14 @@ Response getExecutionDetailWithResponse( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status of execution operation. + * @return the async operation status of execution operation along with {@link Response}. */ - AsyncOperationResult getExecutionAsyncOperationStatus( - String resourceGroupName, String clusterName, String operationId); + Response getExecutionAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context); /** * Gets the async operation status of execution operation. @@ -111,12 +112,11 @@ AsyncOperationResult getExecutionAsyncOperationStatus( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status of execution operation. */ - Response getExecutionAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context); + AsyncOperationResult getExecutionAsyncOperationStatus( + String resourceGroupName, String clusterName, String operationId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionsList.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionsList.java index 6faf8fbc53b9..1816e0bf4e11 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionsList.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptActionsList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hdinsight.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The persisted script action for the cluster. */ @Fluent public final class ScriptActionsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptActionsList.class); - /* * The list of persisted script action details for the cluster. */ @@ -28,6 +24,10 @@ public final class ScriptActionsList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ScriptActionsList class. */ + public ScriptActionsList() { + } + /** * Get the value property: The list of persisted script action details for the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptExecutionHistories.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptExecutionHistories.java index 3de8e87f435d..f57edc3914dd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptExecutionHistories.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ScriptExecutionHistories.java @@ -18,7 +18,7 @@ public interface ScriptExecutionHistories { * @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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster(String resourceGroupName, String clusterName); @@ -31,7 +31,7 @@ public interface ScriptExecutionHistories { * @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 list script execution history response. + * @return the list script execution history response as paginated response with {@link PagedIterable}. */ PagedIterable listByCluster( String resourceGroupName, String clusterName, Context context); @@ -42,11 +42,14 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void promote(String resourceGroupName, String clusterName, String scriptExecutionId); + Response promoteWithResponse( + String resourceGroupName, String clusterName, String scriptExecutionId, Context context); /** * Promotes the specified ad-hoc script execution to a persisted script. @@ -54,12 +57,9 @@ PagedIterable listByCluster( * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param scriptExecutionId The script execution Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - Response promoteWithResponse( - String resourceGroupName, String clusterName, String scriptExecutionId, Context context); + void promote(String resourceGroupName, String clusterName, String scriptExecutionId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SecurityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SecurityProfile.java index 53ca6123a00e..578ea69f146c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SecurityProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SecurityProfile.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The security profile which contains Ssh public key for the HDInsight cluster. */ @Fluent public final class SecurityProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityProfile.class); - /* * The directory type. */ @@ -28,8 +24,7 @@ public final class SecurityProfile { private String domain; /* - * The organizational unit within the Active Directory to place the cluster - * and service accounts. + * The organizational unit within the Active Directory to place the cluster and service accounts. */ @JsonProperty(value = "organizationalUnitDN") private String organizationalUnitDN; @@ -65,12 +60,15 @@ public final class SecurityProfile { private String aaddsResourceId; /* - * User assigned identity that has permissions to read and create - * cluster-related artifacts in the user's AADDS. + * User assigned identity that has permissions to read and create cluster-related artifacts in the user's AADDS. */ @JsonProperty(value = "msiResourceId") private String msiResourceId; + /** Creates an instance of SecurityProfile class. */ + public SecurityProfile() { + } + /** * Get the directoryType property: The directory type. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ServiceSpecification.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ServiceSpecification.java index b12dca8e9d1d..06c1c0806d39 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ServiceSpecification.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ServiceSpecification.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.hdinsight.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; /** The specification of the service. */ @Fluent public final class ServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); - /* * The metric specifications. */ @JsonProperty(value = "metricSpecifications") private List metricSpecifications; + /** Creates an instance of ServiceSpecification class. */ + public ServiceSpecification() { + } + /** * Get the metricSpecifications property: The metric specifications. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshProfile.java index 6557f3b56506..cbe5f6943351 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshProfile.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.hdinsight.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; /** The list of SSH public keys. */ @Fluent public final class SshProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SshProfile.class); - /* * The list of SSH public keys. */ @JsonProperty(value = "publicKeys") private List publicKeys; + /** Creates an instance of SshProfile class. */ + public SshProfile() { + } + /** * Get the publicKeys property: The list of SSH public keys. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshPublicKey.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshPublicKey.java index c154cfb2bfc7..5827d68aa4b6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshPublicKey.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/SshPublicKey.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.hdinsight.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; /** The SSH public key for the cluster nodes. */ @Fluent public final class SshPublicKey { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SshPublicKey.class); - /* * The certificate for SSH. */ @JsonProperty(value = "certificateData") private String certificateData; + /** Creates an instance of SshPublicKey class. */ + public SshPublicKey() { + } + /** * Get the certificateData property: The certificate for SSH. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java index 114f2b8ef6d0..456cff6266c4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The storage Account. */ @Fluent public final class StorageAccount { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccount.class); - /* * The name of the storage account. */ @@ -27,8 +23,7 @@ public final class StorageAccount { private Boolean isDefault; /* - * The container in the storage account, only to be specified for WASB - * storage accounts. + * The container in the storage account, only to be specified for WASB storage accounts. */ @JsonProperty(value = "container") private String container; @@ -46,15 +41,14 @@ public final class StorageAccount { private String key; /* - * The resource ID of storage account, only to be specified for Azure Data - * Lake Storage Gen 2. + * The resource ID of storage account, only to be specified for Azure Data Lake Storage Gen 2. */ @JsonProperty(value = "resourceId") private String resourceId; /* - * The managed identity (MSI) that is allowed to access the storage - * account, only to be specified for Azure Data Lake Storage Gen 2. + * The managed identity (MSI) that is allowed to access the storage account, only to be specified for Azure Data + * Lake Storage Gen 2. */ @JsonProperty(value = "msiResourceId") private String msiResourceId; @@ -71,6 +65,10 @@ public final class StorageAccount { @JsonProperty(value = "fileshare") private String fileshare; + /** Creates an instance of StorageAccount class. */ + public StorageAccount() { + } + /** * Get the name property: The name of the storage account. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageProfile.java index 48c44e9897d8..c119021f09a2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageProfile.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.hdinsight.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; /** The storage profile. */ @Fluent public final class StorageProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageProfile.class); - /* * The list of storage accounts in the cluster. */ @JsonProperty(value = "storageaccounts") private List storageaccounts; + /** Creates an instance of StorageProfile class. */ + public StorageProfile() { + } + /** * Get the storageaccounts property: The list of storage accounts in the cluster. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java index 04dbb0556cbe..33d67aa6dc95 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Tier. */ +/** The cluster tier. */ public final class Tier extends ExpandableStringEnum { /** Static value Standard for Tier. */ public static final Tier STANDARD = fromString("Standard"); @@ -27,7 +27,11 @@ public static Tier fromString(String name) { return fromString(name, Tier.class); } - /** @return known Tier values. */ + /** + * Gets known Tier values. + * + * @return known Tier values. + */ public static Collection values() { return values(Tier.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateClusterIdentityCertificateParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateClusterIdentityCertificateParameters.java index d11ca585e1cf..313d23cf6620 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateClusterIdentityCertificateParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateClusterIdentityCertificateParameters.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The update cluster identity certificate request parameters. */ @Fluent public final class UpdateClusterIdentityCertificateParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateClusterIdentityCertificateParameters.class); - /* * The application id. */ @@ -32,6 +28,10 @@ public final class UpdateClusterIdentityCertificateParameters { @JsonProperty(value = "certificatePassword") private String certificatePassword; + /** Creates an instance of UpdateClusterIdentityCertificateParameters class. */ + public UpdateClusterIdentityCertificateParameters() { + } + /** * Get the applicationId property: The application id. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateGatewaySettingsParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateGatewaySettingsParameters.java index bf0f152a11d2..1d0bb286048c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateGatewaySettingsParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UpdateGatewaySettingsParameters.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.hdinsight.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; /** The update gateway settings request parameters. */ @Fluent public final class UpdateGatewaySettingsParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateGatewaySettingsParameters.class); - /* - * Indicates whether or not the gateway settings based authorization is - * enabled. + * Indicates whether or not the gateway settings based authorization is enabled. */ @JsonProperty(value = "restAuthCredential.isEnabled") private Boolean isCredentialEnabled; @@ -33,6 +28,10 @@ public final class UpdateGatewaySettingsParameters { @JsonProperty(value = "restAuthCredential.password") private String password; + /** Creates an instance of UpdateGatewaySettingsParameters class. */ + public UpdateGatewaySettingsParameters() { + } + /** * Get the isCredentialEnabled property: Indicates whether or not the gateway settings based authorization is * enabled. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Usage.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Usage.java index af0ec39310f5..444afb197fc9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Usage.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Usage.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The details about the usage of a particular limited resource. */ @Fluent public final class Usage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Usage.class); - /* * The type of measurement for usage. */ @@ -38,6 +34,10 @@ public final class Usage { @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private LocalizedName name; + /** Creates an instance of Usage class. */ + public Usage() { + } + /** * Get the unit property: The type of measurement for usage. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java index f11d21cd1813..1e10aff007ba 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The User Assigned Identity. */ @Fluent public class UserAssignedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class); - /* * The principal id of user assigned identity. */ @@ -32,6 +28,10 @@ public class UserAssignedIdentity { @JsonProperty(value = "tenantId") private String tenantId; + /** Creates an instance of UserAssignedIdentity class. */ + public UserAssignedIdentity() { + } + /** * Get the principalId property: The principal id of user assigned identity. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ValidationErrorInfo.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ValidationErrorInfo.java index 2a297ad7429e..9b919e5d669c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ValidationErrorInfo.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ValidationErrorInfo.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hdinsight.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; /** The validation error information. */ @Fluent public final class ValidationErrorInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationErrorInfo.class); - /* * The error code. */ @@ -39,6 +35,10 @@ public final class ValidationErrorInfo { @JsonProperty(value = "messageArguments") private List messageArguments; + /** Creates an instance of ValidationErrorInfo class. */ + public ValidationErrorInfo() { + } + /** * Get the code property: The error code. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionSpec.java index 444066d2ae68..c60bedbbb0de 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionSpec.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionSpec.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** The version properties. */ @Fluent public final class VersionSpec { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VersionSpec.class); - /* * The friendly name */ @@ -41,6 +37,10 @@ public final class VersionSpec { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map componentVersions; + /** Creates an instance of VersionSpec class. */ + public VersionSpec() { + } + /** * Get the friendlyName property: The friendly name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionsCapability.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionsCapability.java index f381cd40d525..f9c023cde5bc 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionsCapability.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VersionsCapability.java @@ -5,22 +5,22 @@ package com.azure.resourcemanager.hdinsight.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; /** The version capability. */ @Fluent public final class VersionsCapability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VersionsCapability.class); - /* * The list of version capabilities. */ @JsonProperty(value = "available") private List available; + /** Creates an instance of VersionsCapability class. */ + public VersionsCapability() { + } + /** * Get the available property: The list of version capabilities. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualMachines.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualMachines.java index 3493350c1b07..2dc16d4b72ec 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualMachines.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualMachines.java @@ -15,25 +15,25 @@ public interface VirtualMachines { * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of the request to list cluster hosts. + * @return result of the request to list cluster hosts along with {@link Response}. */ - List listHosts(String resourceGroupName, String clusterName); + Response> listHostsWithResponse(String resourceGroupName, String clusterName, Context context); /** * Lists the HDInsight clusters hosts. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 result of the request to list cluster hosts. */ - Response> listHostsWithResponse(String resourceGroupName, String clusterName, Context context); + List listHosts(String resourceGroupName, String clusterName); /** * Restarts the specified HDInsight cluster hosts. @@ -66,12 +66,14 @@ public interface VirtualMachines { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the async operation status. + * @return the async operation status along with {@link Response}. */ - AsyncOperationResult getAsyncOperationStatus(String resourceGroupName, String clusterName, String operationId); + Response getAsyncOperationStatusWithResponse( + String resourceGroupName, String clusterName, String operationId, Context context); /** * Gets the async operation status. @@ -79,12 +81,10 @@ public interface VirtualMachines { * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster. * @param operationId The long running operation id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the async operation status. */ - Response getAsyncOperationStatusWithResponse( - String resourceGroupName, String clusterName, String operationId, Context context); + AsyncOperationResult getAsyncOperationStatus(String resourceGroupName, String clusterName, String operationId); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualNetworkProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualNetworkProfile.java index 25ad5db39642..3dc89a9a33a6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualNetworkProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VirtualNetworkProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The virtual network properties. */ @Fluent public final class VirtualNetworkProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkProfile.class); - /* * The ID of the virtual network. */ @@ -26,6 +22,10 @@ public final class VirtualNetworkProfile { @JsonProperty(value = "subnet") private String subnet; + /** Creates an instance of VirtualNetworkProfile class. */ + public VirtualNetworkProfile() { + } + /** * Get the id property: The ID of the virtual network. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeCompatibilityFilterV2.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeCompatibilityFilterV2.java index ef75f08e4076..484dc5cc3c22 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeCompatibilityFilterV2.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeCompatibilityFilterV2.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hdinsight.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; @@ -18,11 +16,8 @@ */ @Fluent public final class VmSizeCompatibilityFilterV2 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VmSizeCompatibilityFilterV2.class); - /* - * The filtering mode. Effectively this can enabling or disabling the VM - * sizes in a particular set. + * The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. */ @JsonProperty(value = "filterMode") private FilterMode filterMode; @@ -64,19 +59,23 @@ public final class VmSizeCompatibilityFilterV2 { private List vmSizes; /* - * Whether apply for ESP cluster. 'true' means only for ESP, 'false' means - * only for non-ESP, null or empty string or others mean for both. + * Whether apply for ESP cluster. 'true' means only for ESP, 'false' means only for non-ESP, null or empty string + * or others mean for both. */ @JsonProperty(value = "espApplied") private String espApplied; /* - * Whether support compute isolation. 'true' means only for - * ComputeIsolationEnabled, 'false' means only for regular cluster. + * Whether support compute isolation. 'true' means only for ComputeIsolationEnabled, 'false' means only for regular + * cluster. */ @JsonProperty(value = "computeIsolationSupported") private String computeIsolationSupported; + /** Creates an instance of VmSizeCompatibilityFilterV2 class. */ + public VmSizeCompatibilityFilterV2() { + } + /** * Get the filterMode property: The filtering mode. Effectively this can enabling or disabling the VM sizes in a * particular set. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeProperty.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeProperty.java index 5509ccfda096..d3af67eb63fb 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeProperty.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/VmSizeProperty.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hdinsight.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; /** The vm size property. */ @Fluent public final class VmSizeProperty { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VmSizeProperty.class); - /* * The vm size name. */ @@ -74,6 +70,10 @@ public final class VmSizeProperty { @JsonProperty(value = "webWorkerResourceDiskSizeInMb") private Long webWorkerResourceDiskSizeInMb; + /** Creates an instance of VmSizeProperty class. */ + public VmSizeProperty() { + } + /** * Get the name property: The vm size name. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/OperationsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/OperationsListSamples.java new file mode 100644 index 000000000000..df2b8ad4a4fc --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ListHDInsightOperations.json + */ + /** + * Sample code: Lists all of the available operations. + * + * @param manager Entry point to HDInsightManager. + */ + public static void listsAllOfTheAvailableOperations(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { + manager.operations().list(Context.NONE); + } +}