diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md b/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md index b539b5f41cda..d724a7a72859 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-08-05) + +- Azure Resource Manager ServiceFabric client library for Java. This package contains Microsoft Azure SDK for ServiceFabric Management SDK. Service Fabric 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/servicefabric/azure-resourcemanager-servicefabric/README.md b/sdk/servicefabric/azure-resourcemanager-servicefabric/README.md index 17f98ec8b292..0016b9e3fd16 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/README.md +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-servicefabric - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md b/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md index 7f5ed87fecf1..31c97baf160e 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md @@ -40,6 +40,10 @@ - [ListUpgradableVersions](#clusters_listupgradableversions) - [Update](#clusters_update) +## Operations + +- [List](#operations_list) + ## Services - [CreateOrUpdate](#services_createorupdate) @@ -56,9 +60,7 @@ import java.util.Map; /** Samples for ApplicationTypeVersions CreateOrUpdate. */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * operationId: ApplicationTypeVersions_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application type version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. @@ -97,9 +99,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationTypeVersions Delete. */ public final class ApplicationTypeVersionsDeleteSamples { /* - * operationId: ApplicationTypeVersions_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete an application type version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. @@ -121,9 +121,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationTypeVersions Get. */ public final class ApplicationTypeVersionsGetSamples { /* - * operationId: ApplicationTypeVersions_Get - * api-version: 2021-06-01 - * x-ms-examples: Get an application type version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. @@ -145,9 +143,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationTypeVersions List. */ public final class ApplicationTypeVersionsListSamples { /* - * operationId: ApplicationTypeVersions_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of application type version resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionListOperation_example.json */ /** * Sample code: Get a list of application type version resources. @@ -170,9 +166,7 @@ import java.util.Map; /** Samples for ApplicationTypes CreateOrUpdate. */ public final class ApplicationTypesCreateOrUpdateSamples { /* - * operationId: ApplicationTypes_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application type + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNamePutOperation_example.json */ /** * Sample code: Put an application type. @@ -209,9 +203,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationTypes Delete. */ public final class ApplicationTypesDeleteSamples { /* - * operationId: ApplicationTypes_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete an application type + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameDeleteOperation_example.json */ /** * Sample code: Delete an application type. @@ -232,9 +224,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationTypes Get. */ public final class ApplicationTypesGetSamples { /* - * operationId: ApplicationTypes_Get - * api-version: 2021-06-01 - * x-ms-examples: Get an application type + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameGetOperation_example.json */ /** * Sample code: Get an application type. @@ -255,9 +245,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationTypes List. */ public final class ApplicationTypesListSamples { /* - * operationId: ApplicationTypes_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of application type name resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameListOperation_example.json */ /** * Sample code: Get a list of application type name resources. @@ -288,9 +276,7 @@ import java.util.Map; /** Samples for Applications CreateOrUpdate. */ public final class ApplicationsCreateOrUpdateSamples { /* - * operationId: Applications_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application with maximum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_example_max.json */ /** * Sample code: Put an application with maximum parameters. @@ -344,9 +330,7 @@ public final class ApplicationsCreateOrUpdateSamples { } /* - * operationId: Applications_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application with minimum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_example_min.json */ /** * Sample code: Put an application with minimum parameters. @@ -368,9 +352,7 @@ public final class ApplicationsCreateOrUpdateSamples { } /* - * operationId: Applications_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application with recreate option + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_recreate_example.json */ /** * Sample code: Put an application with recreate option. @@ -412,9 +394,7 @@ import com.azure.core.util.Context; /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * operationId: Applications_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete an application + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationDeleteOperation_example.json */ /** * Sample code: Delete an application. @@ -435,9 +415,7 @@ import com.azure.core.util.Context; /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * operationId: Applications_Get - * api-version: 2021-06-01 - * x-ms-examples: Get an application + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationGetOperation_example.json */ /** * Sample code: Get an application. @@ -458,9 +436,7 @@ import com.azure.core.util.Context; /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * operationId: Applications_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of application resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationListOperation_example.json */ /** * Sample code: Get a list of application resources. @@ -485,9 +461,7 @@ import java.util.Arrays; /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * operationId: Applications_Update - * api-version: 2021-06-01 - * x-ms-examples: Patch an application + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. @@ -522,9 +496,7 @@ import com.azure.core.util.Context; /** Samples for ClusterVersions Get. */ public final class ClusterVersionsGetSamples { /* - * operationId: ClusterVersions_Get - * api-version: 2021-06-01 - * x-ms-examples: Get cluster version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsGet_example.json */ /** * Sample code: Get cluster version. @@ -546,9 +518,7 @@ import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment /** Samples for ClusterVersions GetByEnvironment. */ public final class ClusterVersionsGetByEnvironmentSamples { /* - * operationId: ClusterVersions_GetByEnvironment - * api-version: 2021-06-01 - * x-ms-examples: Get cluster version by environment + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsGetByEnvironment_example.json */ /** * Sample code: Get cluster version by environment. @@ -572,9 +542,7 @@ import com.azure.core.util.Context; /** Samples for ClusterVersions List. */ public final class ClusterVersionsListSamples { /* - * operationId: ClusterVersions_List - * api-version: 2021-06-01 - * x-ms-examples: List cluster versions + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsList_example.json */ /** * Sample code: List cluster versions. @@ -596,9 +564,7 @@ import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment /** Samples for ClusterVersions ListByEnvironment. */ public final class ClusterVersionsListByEnvironmentSamples { /* - * operationId: ClusterVersions_ListByEnvironment - * api-version: 2021-06-01 - * x-ms-examples: List cluster versions by environment + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsListByEnvironment.json */ /** * Sample code: List cluster versions by environment. @@ -656,9 +622,7 @@ import java.util.Map; /** Samples for Clusters CreateOrUpdate. */ public final class ClustersCreateOrUpdateSamples { /* - * operationId: Clusters_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a cluster with maximum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPutOperation_example_max.json */ /** * Sample code: Put a cluster with maximum parameters. @@ -835,9 +799,7 @@ public final class ClustersCreateOrUpdateSamples { } /* - * operationId: Clusters_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a cluster with minimum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPutOperation_example_min.json */ /** * Sample code: Put a cluster with minimum parameters. @@ -910,9 +872,7 @@ import com.azure.core.util.Context; /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * operationId: Clusters_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete a cluster + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterDeleteOperation_example.json */ /** * Sample code: Delete a cluster. @@ -933,9 +893,7 @@ import com.azure.core.util.Context; /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * operationId: Clusters_Get - * api-version: 2021-06-01 - * x-ms-examples: Get a cluster + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterGetOperation_example.json */ /** * Sample code: Get a cluster. @@ -956,9 +914,7 @@ import com.azure.core.util.Context; /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * operationId: Clusters_List - * api-version: 2021-06-01 - * x-ms-examples: List clusters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterListOperation_example.json */ /** * Sample code: List clusters. @@ -979,9 +935,7 @@ import com.azure.core.util.Context; /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * operationId: Clusters_ListByResourceGroup - * api-version: 2021-06-01 - * x-ms-examples: List cluster by resource group + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterListByResourceGroupOperation_example.json */ /** * Sample code: List cluster by resource group. @@ -1004,9 +958,7 @@ import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescript /** Samples for Clusters ListUpgradableVersions. */ public final class ClustersListUpgradableVersionsSamples { /* - * operationId: Clusters_ListUpgradableVersions - * api-version: 2021-06-01 - * x-ms-examples: Get minimum and maximum code versions + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListUpgradableVersionsMinMax_example.json */ /** * Sample code: Get minimum and maximum code versions. @@ -1019,9 +971,7 @@ public final class ClustersListUpgradableVersionsSamples { } /* - * operationId: Clusters_ListUpgradableVersions - * api-version: 2021-06-01 - * x-ms-examples: Get upgrade path + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListUpgradableVersionsPath_example.json */ /** * Sample code: Get upgrade path. @@ -1059,9 +1009,7 @@ import java.util.Map; /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * operationId: Clusters_Update - * api-version: 2021-06-01 - * x-ms-examples: Patch a cluster + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPatchOperation_example.json */ /** * Sample code: Patch a cluster. @@ -1118,6 +1066,27 @@ public final class ClustersUpdateSamples { } ``` +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListOperations.json + */ + /** + * Sample code: ListOperations. + * + * @param manager Entry point to ServiceFabricManager. + */ + public static void listOperations(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + ### Services_CreateOrUpdate ```java @@ -1135,9 +1104,7 @@ import java.util.Map; /** Samples for Services CreateOrUpdate. */ public final class ServicesCreateOrUpdateSamples { /* - * operationId: Services_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a service with minimum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePutOperation_example_min.json */ /** * Sample code: Put a service with minimum parameters. @@ -1157,9 +1124,7 @@ public final class ServicesCreateOrUpdateSamples { } /* - * operationId: Services_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a service with maximum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePutOperation_example_max.json */ /** * Sample code: Put a service with maximum parameters. @@ -1214,9 +1179,7 @@ import com.azure.core.util.Context; /** Samples for Services Delete. */ public final class ServicesDeleteSamples { /* - * operationId: Services_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete a service + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceDeleteOperation_example.json */ /** * Sample code: Delete a service. @@ -1237,9 +1200,7 @@ import com.azure.core.util.Context; /** Samples for Services Get. */ public final class ServicesGetSamples { /* - * operationId: Services_Get - * api-version: 2021-06-01 - * x-ms-examples: Get a service + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceGetOperation_example.json */ /** * Sample code: Get a service. @@ -1260,9 +1221,7 @@ import com.azure.core.util.Context; /** Samples for Services List. */ public final class ServicesListSamples { /* - * operationId: Services_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of service resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceListOperation_example.json */ /** * Sample code: Get a list of service resources. @@ -1285,9 +1244,7 @@ import com.azure.resourcemanager.servicefabric.models.ServiceResource; /** Samples for Services Update. */ public final class ServicesUpdateSamples { /* - * operationId: Services_Update - * api-version: 2021-06-01 - * x-ms-examples: Patch a service + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePatchOperation_example.json */ /** * Sample code: Patch a service. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java index 04067ded676b..2119bfdab687 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.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; @@ -41,6 +44,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to ServiceFabricManager. Service Fabric Management Client. */ public final class ServiceFabricManager { @@ -85,6 +89,19 @@ public static ServiceFabricManager authenticate(TokenCredential credential, Azur return configure().authenticate(credential, profile); } + /** + * Creates an instance of ServiceFabric service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the ServiceFabric service API instance. + */ + public static ServiceFabricManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new ServiceFabricManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create ServiceFabricManager with optional configuration. * @@ -96,13 +113,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() { @@ -163,6 +181,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. * @@ -170,9 +201,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; } @@ -194,7 +227,7 @@ public ServiceFabricManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.servicefabric") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -212,16 +245,34 @@ public ServiceFabricManager authenticate(TokenCredential credential, AzureProfil 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 = @@ -233,7 +284,11 @@ public ServiceFabricManager authenticate(TokenCredential credential, AzureProfil } } - /** @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); @@ -241,7 +296,11 @@ public Clusters clusters() { return clusters; } - /** @return Resource collection API of ClusterVersions. */ + /** + * Gets the resource collection API of ClusterVersions. + * + * @return Resource collection API of ClusterVersions. + */ public ClusterVersions clusterVersions() { if (this.clusterVersions == null) { this.clusterVersions = new ClusterVersionsImpl(clientObject.getClusterVersions(), this); @@ -249,7 +308,11 @@ public ClusterVersions clusterVersions() { return clusterVersions; } - /** @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); @@ -257,7 +320,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of ApplicationTypes. */ + /** + * Gets the resource collection API of ApplicationTypes. It manages ApplicationTypeResource. + * + * @return Resource collection API of ApplicationTypes. + */ public ApplicationTypes applicationTypes() { if (this.applicationTypes == null) { this.applicationTypes = new ApplicationTypesImpl(clientObject.getApplicationTypes(), this); @@ -265,7 +332,11 @@ public ApplicationTypes applicationTypes() { return applicationTypes; } - /** @return Resource collection API of ApplicationTypeVersions. */ + /** + * Gets the resource collection API of ApplicationTypeVersions. It manages ApplicationTypeVersionResource. + * + * @return Resource collection API of ApplicationTypeVersions. + */ public ApplicationTypeVersions applicationTypeVersions() { if (this.applicationTypeVersions == null) { this.applicationTypeVersions = @@ -274,7 +345,11 @@ public ApplicationTypeVersions applicationTypeVersions() { return applicationTypeVersions; } - /** @return Resource collection API of Applications. */ + /** + * Gets the resource collection API of Applications. It manages ApplicationResource. + * + * @return Resource collection API of Applications. + */ public Applications applications() { if (this.applications == null) { this.applications = new ApplicationsImpl(clientObject.getApplications(), this); @@ -282,7 +357,11 @@ public Applications applications() { return applications; } - /** @return Resource collection API of Services. */ + /** + * Gets the resource collection API of Services. It manages ServiceResource. + * + * @return Resource collection API of Services. + */ public Services services() { if (this.services == null) { this.services = new ServicesImpl(clientObject.getServices(), this); diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypeVersionsClient.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypeVersionsClient.java index 95b6614416a5..dd0901d53d09 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypeVersionsClient.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypeVersionsClient.java @@ -16,8 +16,10 @@ /** An instance of this class provides access to all the operations defined in ApplicationTypeVersionsClient. */ public interface ApplicationTypeVersionsClient { /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -34,8 +36,10 @@ ApplicationTypeVersionResourceInner get( String resourceGroupName, String clusterName, String applicationTypeName, String version); /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -46,14 +50,16 @@ ApplicationTypeVersionResourceInner get( * @throws com.azure.core.management.exception.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 Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context); /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -63,9 +69,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application type version resource for the specified application type name resource. + * @return the {@link SyncPoller} for polling of an application type version resource for the specified application + * type name resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationTypeVersionResourceInner> beginCreateOrUpdate( String resourceGroupName, @@ -75,7 +82,9 @@ Response getWithResponse( ApplicationTypeVersionResourceInner parameters); /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -86,9 +95,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application type version resource for the specified application type name resource. + * @return the {@link SyncPoller} for polling of an application type version resource for the specified application + * type name resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationTypeVersionResourceInner> beginCreateOrUpdate( String resourceGroupName, @@ -99,7 +109,9 @@ Response getWithResponse( Context context); /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -120,7 +132,9 @@ ApplicationTypeVersionResourceInner createOrUpdate( ApplicationTypeVersionResourceInner parameters); /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -143,7 +157,9 @@ ApplicationTypeVersionResourceInner createOrUpdate( Context context); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -152,14 +168,16 @@ ApplicationTypeVersionResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName, String version); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -169,14 +187,16 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -190,7 +210,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String clusterName, String applicationTypeName, String version); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -206,7 +228,10 @@ void delete( String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context); /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -223,7 +248,10 @@ ApplicationTypeVersionResourceListInner list( String resourceGroupName, String clusterName, String applicationTypeName); /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -234,7 +262,7 @@ ApplicationTypeVersionResourceListInner list( * @throws com.azure.core.management.exception.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 application type version resources created or in the process of being created in the Service Fabric - * application type name resource. + * application type name resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypesClient.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypesClient.java index b4b6d2f5e55d..c645851e9137 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypesClient.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationTypesClient.java @@ -16,7 +16,9 @@ /** An instance of this class provides access to all the operations defined in ApplicationTypesClient. */ public interface ApplicationTypesClient { /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -32,7 +34,9 @@ public interface ApplicationTypesClient { ApplicationTypeResourceInner get(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -43,14 +47,16 @@ public interface ApplicationTypesClient { * @throws com.azure.core.management.exception.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 Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Create or update a Service Fabric application type name resource with the specified name. + * Creates or updates a Service Fabric application type name resource. + * + *

Create or update a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -69,7 +75,9 @@ ApplicationTypeResourceInner createOrUpdate( ApplicationTypeResourceInner parameters); /** - * Create or update a Service Fabric application type name resource with the specified name. + * Creates or updates a Service Fabric application type name resource. + * + *

Create or update a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -79,7 +87,7 @@ ApplicationTypeResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application type name resource. + * @return the application type name resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -90,7 +98,9 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -98,14 +108,16 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -114,14 +126,16 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -134,7 +148,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -148,8 +164,10 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -163,8 +181,10 @@ SyncPoller, Void> beginDelete( ApplicationTypeResourceListInner list(String resourceGroupName, String clusterName); /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -173,7 +193,7 @@ SyncPoller, Void> beginDelete( * @throws com.azure.core.management.exception.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 application type name resources created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationsClient.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationsClient.java index c2132aa03556..4a4794ae634c 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationsClient.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ApplicationsClient.java @@ -17,7 +17,9 @@ /** An instance of this class provides access to all the operations defined in ApplicationsClient. */ public interface ApplicationsClient { /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -33,7 +35,9 @@ public interface ApplicationsClient { ApplicationResourceInner get(String resourceGroupName, String clusterName, String applicationName); /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -44,14 +48,16 @@ public interface ApplicationsClient { * @throws com.azure.core.management.exception.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 Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -60,14 +66,16 @@ 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 application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters); /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -77,9 +85,9 @@ SyncPoller, ApplicationResourceInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, @@ -88,7 +96,9 @@ SyncPoller, ApplicationResourceInner> begin Context context); /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -104,7 +114,9 @@ ApplicationResourceInner createOrUpdate( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters); /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -125,7 +137,9 @@ ApplicationResourceInner createOrUpdate( Context context); /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -134,14 +148,16 @@ ApplicationResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationResourceInner> beginUpdate( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceUpdate parameters); /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -151,9 +167,9 @@ SyncPoller, ApplicationResourceInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ApplicationResourceInner> beginUpdate( String resourceGroupName, String clusterName, @@ -162,7 +178,9 @@ SyncPoller, ApplicationResourceInner> begin Context context); /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -178,7 +196,9 @@ ApplicationResourceInner update( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceUpdate parameters); /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -199,7 +219,9 @@ ApplicationResourceInner update( Context context); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -207,14 +229,16 @@ ApplicationResourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -223,14 +247,16 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -243,7 +269,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String clusterName, String applicationName); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -257,7 +285,10 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -271,7 +302,10 @@ SyncPoller, Void> beginDelete( ApplicationResourceListInner list(String resourceGroupName, String clusterName); /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -280,7 +314,7 @@ SyncPoller, Void> beginDelete( * @throws com.azure.core.management.exception.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 application resources created or in the process of being created in the Service Fabric cluster - * resource. + * resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClusterVersionsClient.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClusterVersionsClient.java index 85144b21b1cc..61cc69e39283 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClusterVersionsClient.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClusterVersionsClient.java @@ -14,7 +14,9 @@ /** An instance of this class provides access to all the operations defined in ClusterVersionsClient. */ public interface ClusterVersionsClient { /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. @@ -27,7 +29,9 @@ public interface ClusterVersionsClient { ClusterCodeVersionsListResultInner get(String location, String clusterVersion); /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. @@ -35,14 +39,16 @@ public interface ClusterVersionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version. + * @return information about an available Service Fabric cluster code version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String location, String clusterVersion, Context context); /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -57,7 +63,9 @@ ClusterCodeVersionsListResultInner getByEnvironment( String location, ClusterVersionsEnvironment environment, String clusterVersion); /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -66,14 +74,17 @@ ClusterCodeVersionsListResultInner getByEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment. + * @return information about an available Service Fabric cluster code version by environment along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByEnvironmentWithResponse( String location, ClusterVersionsEnvironment environment, String clusterVersion, Context context); /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,20 +96,24 @@ Response getByEnvironmentWithResponse( ClusterCodeVersionsListResultInner list(String location); /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @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 available code versions for Service Fabric cluster resources by location. + * @return all available code versions for Service Fabric cluster resources by location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(String location, Context context); /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -111,7 +126,9 @@ Response getByEnvironmentWithResponse( ClusterCodeVersionsListResultInner listByEnvironment(String location, ClusterVersionsEnvironment environment); /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -119,7 +136,8 @@ Response getByEnvironmentWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 available code versions for Service Fabric cluster resources by environment. + * @return all available code versions for Service Fabric cluster resources by environment along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listByEnvironmentWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClustersClient.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClustersClient.java index e3acf2d9da58..4674dc0cf83b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClustersClient.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClustersClient.java @@ -19,7 +19,10 @@ /** An instance of this class provides access to all the operations defined in ClustersClient. */ public interface ClustersClient { /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -33,7 +36,10 @@ public interface ClustersClient { ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -42,14 +48,16 @@ public interface ClustersClient { * @throws com.azure.core.management.exception.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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( String resourceGroupName, String clusterName, Context context); /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -57,14 +65,16 @@ 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 cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, ClusterInner parameters); /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -73,14 +83,16 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, ClusterInner parameters, Context context); /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -94,7 +106,9 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters); /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -109,7 +123,9 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters, Context context); /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -118,14 +134,16 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginUpdate( String resourceGroupName, String clusterName, ClusterUpdateParameters parameters); /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -135,14 +153,16 @@ SyncPoller, ClusterInner> 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 cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ClusterInner> beginUpdate( String resourceGroupName, String clusterName, ClusterUpdateParameters parameters, Context context); /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -157,7 +177,9 @@ SyncPoller, ClusterInner> beginUpdate( ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdateParameters parameters); /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -174,7 +196,9 @@ ClusterInner update( String resourceGroupName, String clusterName, ClusterUpdateParameters parameters, Context context); /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -186,7 +210,9 @@ ClusterInner update( void delete(String resourceGroupName, String clusterName); /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -194,13 +220,15 @@ ClusterInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String clusterName, Context context); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,20 +240,25 @@ ClusterInner update( ClusterListResultInner listByResourceGroup(String resourceGroupName); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the resource group. + * @return all Service Fabric cluster resources created or in the process of being created in the resource group + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -235,19 +268,25 @@ ClusterInner update( ClusterListResultInner list(); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the subscription. + * @return all Service Fabric cluster resources created or in the process of being created in the subscription along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(Context context); /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -262,7 +301,10 @@ ClusterInner update( UpgradableVersionPathResultInner listUpgradableVersions(String resourceGroupName, String clusterName); /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -273,7 +315,7 @@ ClusterInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listUpgradableVersionsWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/OperationsClient.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/OperationsClient.java index 31dff4796b3c..e901b65091fa 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/OperationsClient.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/OperationsClient.java @@ -13,23 +13,29 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API 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 the list of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ServicesClient.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ServicesClient.java index 8a6e3e36e034..8154b1cc26e5 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ServicesClient.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ServicesClient.java @@ -17,7 +17,9 @@ /** An instance of this class provides access to all the operations defined in ServicesClient. */ public interface ServicesClient { /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -34,7 +36,9 @@ public interface ServicesClient { ServiceResourceInner get(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -46,14 +50,16 @@ public interface ServicesClient { * @throws com.azure.core.management.exception.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 Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context); /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -63,9 +69,9 @@ 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 service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServiceResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, @@ -74,7 +80,9 @@ SyncPoller, ServiceResourceInner> beginCreateOr ServiceResourceInner parameters); /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -85,9 +93,9 @@ SyncPoller, ServiceResourceInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServiceResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, @@ -97,7 +105,9 @@ SyncPoller, ServiceResourceInner> beginCreateOr Context context); /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -118,7 +128,9 @@ ServiceResourceInner createOrUpdate( ServiceResourceInner parameters); /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -141,7 +153,9 @@ ServiceResourceInner createOrUpdate( Context context); /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -151,9 +165,9 @@ ServiceResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServiceResourceInner> beginUpdate( String resourceGroupName, String clusterName, @@ -162,7 +176,9 @@ SyncPoller, ServiceResourceInner> beginUpdate( ServiceResourceUpdate parameters); /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -173,9 +189,9 @@ SyncPoller, ServiceResourceInner> 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 service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServiceResourceInner> beginUpdate( String resourceGroupName, String clusterName, @@ -185,7 +201,9 @@ SyncPoller, ServiceResourceInner> beginUpdate( Context context); /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -206,7 +224,9 @@ ServiceResourceInner update( ServiceResourceUpdate parameters); /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -229,7 +249,9 @@ ServiceResourceInner update( Context context); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -238,14 +260,16 @@ ServiceResourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -255,14 +279,16 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -276,7 +302,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -292,7 +320,10 @@ void delete( String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context); /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -307,7 +338,10 @@ void delete( ServiceResourceListInner list(String resourceGroupName, String clusterName, String applicationName); /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -317,7 +351,7 @@ void delete( * @throws com.azure.core.management.exception.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 service resources created or in the process of being created in the Service Fabric application - * resource. + * resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceInner.java index 003016cc82e2..726facce1d55 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceInner.java @@ -7,12 +7,10 @@ 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.servicefabric.models.ApplicationMetricDescription; import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy; import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity; import com.azure.resourcemanager.servicefabric.models.ManagedIdentity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -21,8 +19,6 @@ /** The application resource. */ @Fluent public final class ApplicationResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationResourceInner.class); - /* * Describes the managed identities for an Azure resource. */ @@ -36,8 +32,7 @@ public final class ApplicationResourceInner extends ProxyResource { private ApplicationResourceProperties innerProperties; /* - * It will be deprecated in New API, resource location depends on the - * parent resource. + * It will be deprecated in New API, resource location depends on the parent resource. */ @JsonProperty(value = "location") private String location; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceListInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceListInner.java index 740db258de6d..491df70b3d42 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceListInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceListInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.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; /** The list of application resources. */ @Fluent public final class ApplicationResourceListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationResourceListInner.class); - /* * The value property. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceProperties.java index af4faf65d772..2335f870a2c4 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceProperties.java @@ -5,11 +5,9 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription; import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy; import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -17,11 +15,8 @@ /** The application resource properties. */ @Fluent public final class ApplicationResourceProperties extends ApplicationResourceUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationResourceProperties.class); - /* - * The current deployment or provisioning state, which only appears in the - * response + * The current deployment or provisioning state, which only appears in the response */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceUpdateProperties.java index da9c28d7f94d..f7adb98b3e84 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceUpdateProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationResourceUpdateProperties.java @@ -5,11 +5,9 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription; import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy; import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -18,18 +16,15 @@ /** The application resource properties for patch operations. */ @Fluent public class ApplicationResourceUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationResourceUpdateProperties.class); - /* - * The version of the application type as defined in the application - * manifest. + * The version of the application type as defined in the application manifest. */ @JsonProperty(value = "typeVersion") private String typeVersion; /* - * List of application parameters with overridden values from their default - * values specified in the application manifest. + * List of application parameters with overridden values from their default values specified in the application + * manifest. */ @JsonProperty(value = "parameters") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -42,21 +37,18 @@ public class ApplicationResourceUpdateProperties { private ApplicationUpgradePolicy upgradePolicy; /* - * The minimum number of nodes where Service Fabric will reserve capacity - * for this application. Note that this does not mean that the services of - * this application will be placed on all of those nodes. If this property - * is set to zero, no capacity will be reserved. The value of this property - * cannot be more than the value of the MaximumNodes property. + * The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does + * not mean that the services of this application will be placed on all of those nodes. If this property is set to + * zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes + * property. */ @JsonProperty(value = "minimumNodes") private Long minimumNodes; /* - * The maximum number of nodes where Service Fabric will reserve capacity - * for this application. Note that this does not mean that the services of - * this application will be placed on all of those nodes. By default, the - * value of this property is zero and it means that the services can be - * placed on any node. + * The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does + * not mean that the services of this application will be placed on all of those nodes. By default, the value of + * this property is zero and it means that the services can be placed on any node. */ @JsonProperty(value = "maximumNodes") private Long maximumNodes; @@ -74,8 +66,7 @@ public class ApplicationResourceUpdateProperties { private List metrics; /* - * List of user assigned identities for the application, each mapped to a - * friendly name. + * List of user assigned identities for the application, each mapped to a friendly name. */ @JsonProperty(value = "managedIdentities") private List managedIdentities; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceInner.java index 7cbfa46a7341..9c6263706f39 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceInner.java @@ -7,8 +7,6 @@ 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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -16,8 +14,6 @@ /** The application type name resource. */ @Fluent public final class ApplicationTypeResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeResourceInner.class); - /* * The application type name properties */ @@ -25,8 +21,7 @@ public final class ApplicationTypeResourceInner extends ProxyResource { private ApplicationTypeResourceProperties innerProperties; /* - * It will be deprecated in New API, resource location depends on the - * parent resource. + * It will be deprecated in New API, resource location depends on the parent resource. */ @JsonProperty(value = "location") private String location; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceListInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceListInner.java index afeaccfa1942..8775d4a28fa5 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceListInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceListInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.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; /** The list of application type names. */ @Fluent public final class ApplicationTypeResourceListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeResourceListInner.class); - /* * The value property. */ @@ -22,8 +18,7 @@ public final class ApplicationTypeResourceListInner { private List value; /* - * URL to get the next set of application type list results if there are - * any. + * URL to get the next set of application type list results if there are any. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceProperties.java index 861f248e4bce..0d22a1c96382 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeResourceProperties.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.servicefabric.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; /** The application type name properties. */ @Immutable public final class ApplicationTypeResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeResourceProperties.class); - /* - * The current deployment or provisioning state, which only appears in the - * response. + * The current deployment or provisioning state, which only appears in the response. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceInner.java index d7ed399e6beb..d7a63e29f2d2 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceInner.java @@ -7,8 +7,6 @@ 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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -16,8 +14,6 @@ /** An application type version resource for the specified application type name resource. */ @Fluent public final class ApplicationTypeVersionResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeVersionResourceInner.class); - /* * The properties of the application type version resource. */ @@ -25,8 +21,7 @@ public final class ApplicationTypeVersionResourceInner extends ProxyResource { private ApplicationTypeVersionResourceProperties innerProperties; /* - * It will be deprecated in New API, resource location depends on the - * parent resource. + * It will be deprecated in New API, resource location depends on the parent resource. */ @JsonProperty(value = "location") private String location; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceListInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceListInner.java index 3684625c7bc3..b65f81478e9f 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceListInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceListInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.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; /** The list of application type version resources for the specified application type name resource. */ @Fluent public final class ApplicationTypeVersionResourceListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeVersionResourceListInner.class); - /* * The value property. */ @@ -22,8 +18,7 @@ public final class ApplicationTypeVersionResourceListInner { private List value; /* - * URL to get the next set of application type version list results if - * there are any. + * URL to get the next set of application type version list results if there are any. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceProperties.java index 1f68f3b538d1..d47638a92549 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ApplicationTypeVersionResourceProperties.java @@ -6,7 +6,6 @@ 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,11 +13,8 @@ /** The properties of the application type version resource. */ @Fluent public final class ApplicationTypeVersionResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeVersionResourceProperties.class); - /* - * The current deployment or provisioning state, which only appears in the - * response + * The current deployment or provisioning state, which only appears in the response */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; @@ -30,8 +26,7 @@ public final class ApplicationTypeVersionResourceProperties { private String appPackageUrl; /* - * List of application type parameters that can be overridden when creating - * or updating the application. + * List of application type parameters that can be overridden when creating or updating the application. */ @JsonProperty(value = "defaultParameterList", access = JsonProperty.Access.WRITE_ONLY) @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -84,10 +79,12 @@ public Map defaultParameterList() { */ public void validate() { if (appPackageUrl() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property appPackageUrl in model ApplicationTypeVersionResourceProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationTypeVersionResourceProperties.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterCodeVersionsListResultInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterCodeVersionsListResultInner.java index 77400a50a509..d1a4b7248906 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterCodeVersionsListResultInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterCodeVersionsListResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.ClusterCodeVersionsResult; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list results of the Service Fabric runtime versions. */ @Fluent public final class ClusterCodeVersionsListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterCodeVersionsListResultInner.class); - /* * The value property. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterInner.java index 555fe036d905..2ebd9840c782 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterInner.java @@ -7,7 +7,6 @@ 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.servicefabric.models.AddOnFeatures; import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy; import com.azure.resourcemanager.servicefabric.models.AzureActiveDirectory; @@ -27,7 +26,6 @@ import com.azure.resourcemanager.servicefabric.models.SfZonalUpgradeMode; import com.azure.resourcemanager.servicefabric.models.UpgradeMode; import com.azure.resourcemanager.servicefabric.models.VmssZonalUpgradeMode; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -36,8 +34,6 @@ /** The cluster resource. */ @Fluent public final class ClusterInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class); - /* * The cluster resource properties */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterListResultInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterListResultInner.java index 26d90cb9688e..b24c92d831a0 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterListResultInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterListResultInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.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; /** Cluster list results. */ @Fluent public final class ClusterListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterListResultInner.class); - /* * The value property. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterProperties.java index cbb07f7c5f81..910ac14458ce 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterProperties.java @@ -25,7 +25,6 @@ import com.azure.resourcemanager.servicefabric.models.SfZonalUpgradeMode; import com.azure.resourcemanager.servicefabric.models.UpgradeMode; import com.azure.resourcemanager.servicefabric.models.VmssZonalUpgradeMode; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -33,8 +32,6 @@ /** Describes the cluster resource properties. */ @Fluent public final class ClusterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterProperties.class); - /* * The list of add-on features to enable in the cluster. */ @@ -54,47 +51,41 @@ public final class ClusterProperties { private AzureActiveDirectory azureActiveDirectory; /* - * The certificate to use for securing the cluster. The certificate - * provided will be used for node to node security within the cluster, SSL - * certificate for cluster management endpoint and default admin client. + * The certificate to use for securing the cluster. The certificate provided will be used for node to node security + * within the cluster, SSL certificate for cluster management endpoint and default admin client. */ @JsonProperty(value = "certificate") private CertificateDescription certificate; /* - * Describes a list of server certificates referenced by common name that - * are used to secure the cluster. + * Describes a list of server certificates referenced by common name that are used to secure the cluster. */ @JsonProperty(value = "certificateCommonNames") private ServerCertificateCommonNames certificateCommonNames; /* - * The list of client certificates referenced by common name that are - * allowed to manage the cluster. + * The list of client certificates referenced by common name that are allowed to manage the cluster. */ @JsonProperty(value = "clientCertificateCommonNames") private List clientCertificateCommonNames; /* - * The list of client certificates referenced by thumbprint that are - * allowed to manage the cluster. + * The list of client certificates referenced by thumbprint that are allowed to manage the cluster. */ @JsonProperty(value = "clientCertificateThumbprints") private List clientCertificateThumbprints; /* - * The Service Fabric runtime version of the cluster. This property can - * only by set the user when **upgradeMode** is set to 'Manual'. To get - * list of available Service Fabric versions for new clusters use - * [ClusterVersion API](./ClusterVersion.md). To get the list of available - * version for existing clusters use **availableClusterVersions**. + * The Service Fabric runtime version of the cluster. This property can only by set the user when **upgradeMode** + * is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion + * API](./ClusterVersion.md). To get the list of available version for existing clusters use + * **availableClusterVersions**. */ @JsonProperty(value = "clusterCodeVersion") private String clusterCodeVersion; /* - * The Azure Resource Provider endpoint. A system service in the cluster - * connects to this endpoint. + * The Azure Resource Provider endpoint. A system service in the cluster connects to this endpoint. */ @JsonProperty(value = "clusterEndpoint", access = JsonProperty.Access.WRITE_ONLY) private String clusterEndpoint; @@ -108,30 +99,21 @@ public final class ClusterProperties { /* * The current state of the cluster. * - * - WaitingForNodes - Indicates that the cluster resource is created and - * the resource provider is waiting for Service Fabric VM extension to boot - * up and report to it. - * - Deploying - Indicates that the Service Fabric runtime is being - * installed on the VMs. Cluster resource will be in this state until the - * cluster boots up and system services are up. - * - BaselineUpgrade - Indicates that the cluster is upgrading to - * establishes the cluster version. This upgrade is automatically initiated - * when the cluster boots up for the first time. - * - UpdatingUserConfiguration - Indicates that the cluster is being - * upgraded with the user provided configuration. - * - UpdatingUserCertificate - Indicates that the cluster is being upgraded - * with the user provided certificate. - * - UpdatingInfrastructure - Indicates that the cluster is being upgraded - * with the latest Service Fabric runtime version. This happens only when - * the **upgradeMode** is set to 'Automatic'. - * - EnforcingClusterVersion - Indicates that cluster is on a different - * version than expected and the cluster is being upgraded to the expected - * version. - * - UpgradeServiceUnreachable - Indicates that the system service in the - * cluster is no longer polling the Resource Provider. Clusters in this - * state cannot be managed by the Resource Provider. - * - AutoScale - Indicates that the ReliabilityLevel of the cluster is - * being adjusted. + * - WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for + * Service Fabric VM extension to boot up and report to it. + * - Deploying - Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be + * in this state until the cluster boots up and system services are up. + * - BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is + * automatically initiated when the cluster boots up for the first time. + * - UpdatingUserConfiguration - Indicates that the cluster is being upgraded with the user provided configuration. + * - UpdatingUserCertificate - Indicates that the cluster is being upgraded with the user provided certificate. + * - UpdatingInfrastructure - Indicates that the cluster is being upgraded with the latest Service Fabric runtime + * version. This happens only when the **upgradeMode** is set to 'Automatic'. + * - EnforcingClusterVersion - Indicates that cluster is on a different version than expected and the cluster is + * being upgraded to the expected version. + * - UpgradeServiceUnreachable - Indicates that the system service in the cluster is no longer polling the Resource + * Provider. Clusters in this state cannot be managed by the Resource Provider. + * - AutoScale - Indicates that the ReliabilityLevel of the cluster is being adjusted. * - Ready - Indicates that the cluster is in a stable state. * */ @@ -139,8 +121,7 @@ public final class ClusterProperties { private ClusterState clusterState; /* - * The storage account information for storing Service Fabric diagnostic - * logs. + * The storage account information for storing Service Fabric diagnostic logs. */ @JsonProperty(value = "diagnosticsStorageAccountConfig") private DiagnosticsStorageAccountConfig diagnosticsStorageAccountConfig; @@ -176,18 +157,16 @@ public final class ClusterProperties { private ProvisioningState provisioningState; /* - * The reliability level sets the replica set size of system services. - * Learn about + * The reliability level sets the replica set size of system services. Learn about * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). * - * - None - Run the System services with a target replica set count of 1. - * This should only be used for test clusters. - * - Bronze - Run the System services with a target replica set count of 3. - * This should only be used for test clusters. + * - None - Run the System services with a target replica set count of 1. This should only be used for test + * clusters. + * - Bronze - Run the System services with a target replica set count of 3. This should only be used for test + * clusters. * - Silver - Run the System services with a target replica set count of 5. * - Gold - Run the System services with a target replica set count of 7. - * - Platinum - Run the System services with a target replica set count of - * 9. + * - Platinum - Run the System services with a target replica set count of 9. * */ @JsonProperty(value = "reliabilityLevel") @@ -200,8 +179,7 @@ public final class ClusterProperties { private CertificateDescription reverseProxyCertificate; /* - * Describes a list of server certificates referenced by common name that - * are used to secure the cluster. + * Describes a list of server certificates referenced by common name that are used to secure the cluster. */ @JsonProperty(value = "reverseProxyCertificateCommonNames") private ServerCertificateCommonNames reverseProxyCertificateCommonNames; @@ -213,8 +191,7 @@ public final class ClusterProperties { private ClusterUpgradePolicy upgradeDescription; /* - * The upgrade mode of the cluster when new Service Fabric runtime version - * is available. + * The upgrade mode of the cluster when new Service Fabric runtime version is available. */ @JsonProperty(value = "upgradeMode") private UpgradeMode upgradeMode; @@ -226,24 +203,21 @@ public final class ClusterProperties { private ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy; /* - * The VM image VMSS has been configured with. Generic names such as - * Windows or Linux can be used. + * The VM image VMSS has been configured with. Generic names such as Windows or Linux can be used. */ @JsonProperty(value = "vmImage") private String vmImage; /* - * This property controls the logical grouping of VMs in upgrade domains - * (UDs). This property can't be modified if a node type with multiple - * Availability Zones is already present in the cluster. + * This property controls the logical grouping of VMs in upgrade domains (UDs). This property can't be modified if + * a node type with multiple Availability Zones is already present in the cluster. */ @JsonProperty(value = "sfZonalUpgradeMode") private SfZonalUpgradeMode sfZonalUpgradeMode; /* - * This property defines the upgrade mode for the virtual machine scale - * set, it is mandatory if a node type with multiple Availability Zones is - * added. + * This property defines the upgrade mode for the virtual machine scale set, it is mandatory if a node type with + * multiple Availability Zones is added. */ @JsonProperty(value = "vmssZonalUpgradeMode") private VmssZonalUpgradeMode vmssZonalUpgradeMode; @@ -255,25 +229,22 @@ public final class ClusterProperties { private Boolean infrastructureServiceManager; /* - * Indicates when new cluster runtime version upgrades will be applied - * after they are released. By default is Wave0. Only applies when - * **upgradeMode** is set to 'Automatic'. + * Indicates when new cluster runtime version upgrades will be applied after they are released. By default is + * Wave0. Only applies when **upgradeMode** is set to 'Automatic'. */ @JsonProperty(value = "upgradeWave") private ClusterUpgradeCadence upgradeWave; /* - * Indicates the start date and time to pause automatic runtime version - * upgrades on the cluster for an specific period of time on the cluster - * (UTC). + * Indicates the start date and time to pause automatic runtime version upgrades on the cluster for an specific + * period of time on the cluster (UTC). */ @JsonProperty(value = "upgradePauseStartTimestampUtc") private OffsetDateTime upgradePauseStartTimestampUtc; /* - * Indicates the end date and time to pause automatic runtime version - * upgrades on the cluster for an specific period of time on the cluster - * (UTC). + * Indicates the end date and time to pause automatic runtime version upgrades on the cluster for an specific + * period of time on the cluster (UTC). */ @JsonProperty(value = "upgradePauseEndTimestampUtc") private OffsetDateTime upgradePauseEndTimestampUtc; @@ -976,13 +947,13 @@ public void validate() { fabricSettings().forEach(e -> e.validate()); } if (managementEndpoint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property managementEndpoint in model ClusterProperties")); } if (nodeTypes() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property nodeTypes in model ClusterProperties")); } else { @@ -1004,4 +975,6 @@ public void validate() { notifications().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterProperties.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterPropertiesUpdateParameters.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterPropertiesUpdateParameters.java index a76d143e7f90..717ce1fce052 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterPropertiesUpdateParameters.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterPropertiesUpdateParameters.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.AddOnFeatures; import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy; import com.azure.resourcemanager.servicefabric.models.CertificateDescription; @@ -21,7 +20,6 @@ import com.azure.resourcemanager.servicefabric.models.SfZonalUpgradeMode; import com.azure.resourcemanager.servicefabric.models.UpgradeMode; import com.azure.resourcemanager.servicefabric.models.VmssZonalUpgradeMode; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -29,8 +27,6 @@ /** Describes the cluster resource properties that can be updated during PATCH operation. */ @Fluent public final class ClusterPropertiesUpdateParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPropertiesUpdateParameters.class); - /* * The list of add-on features to enable in the cluster. */ @@ -38,40 +34,37 @@ public final class ClusterPropertiesUpdateParameters { private List addOnFeatures; /* - * The certificate to use for securing the cluster. The certificate - * provided will be used for node to node security within the cluster, SSL - * certificate for cluster management endpoint and default admin client. + * The certificate to use for securing the cluster. The certificate provided will be used for node to node + * security within the cluster, SSL certificate for cluster management endpoint and default admin client. */ @JsonProperty(value = "certificate") private CertificateDescription certificate; /* - * Describes a list of server certificates referenced by common name that - * are used to secure the cluster. + * Describes a list of server certificates referenced by common name that are used to secure the cluster. */ @JsonProperty(value = "certificateCommonNames") private ServerCertificateCommonNames certificateCommonNames; /* - * The list of client certificates referenced by common name that are - * allowed to manage the cluster. This will overwrite the existing list. + * The list of client certificates referenced by common name that are allowed to manage the cluster. This will + * overwrite the existing list. */ @JsonProperty(value = "clientCertificateCommonNames") private List clientCertificateCommonNames; /* - * The list of client certificates referenced by thumbprint that are - * allowed to manage the cluster. This will overwrite the existing list. + * The list of client certificates referenced by thumbprint that are allowed to manage the cluster. This will + * overwrite the existing list. */ @JsonProperty(value = "clientCertificateThumbprints") private List clientCertificateThumbprints; /* - * The Service Fabric runtime version of the cluster. This property can - * only by set the user when **upgradeMode** is set to 'Manual'. To get - * list of available Service Fabric versions for new clusters use - * [ClusterVersion API](./ClusterVersion.md). To get the list of available - * version for existing clusters use **availableClusterVersions**. + * The Service Fabric runtime version of the cluster. This property can only by set the user when **upgradeMode** + * is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion + * API](./ClusterVersion.md). To get the list of available version for existing clusters use + * **availableClusterVersions**. */ @JsonProperty(value = "clusterCodeVersion") private String clusterCodeVersion; @@ -83,32 +76,28 @@ public final class ClusterPropertiesUpdateParameters { private Boolean eventStoreServiceEnabled; /* - * The list of custom fabric settings to configure the cluster. This will - * overwrite the existing list. + * The list of custom fabric settings to configure the cluster. This will overwrite the existing list. */ @JsonProperty(value = "fabricSettings") private List fabricSettings; /* - * The list of node types in the cluster. This will overwrite the existing - * list. + * The list of node types in the cluster. This will overwrite the existing list. */ @JsonProperty(value = "nodeTypes") private List nodeTypes; /* - * The reliability level sets the replica set size of system services. - * Learn about + * The reliability level sets the replica set size of system services. Learn about * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). * - * - None - Run the System services with a target replica set count of 1. - * This should only be used for test clusters. - * - Bronze - Run the System services with a target replica set count of 3. - * This should only be used for test clusters. + * - None - Run the System services with a target replica set count of 1. This should only be used for test + * clusters. + * - Bronze - Run the System services with a target replica set count of 3. This should only be used for test + * clusters. * - Silver - Run the System services with a target replica set count of 5. * - Gold - Run the System services with a target replica set count of 7. - * - Platinum - Run the System services with a target replica set count of - * 9. + * - Platinum - Run the System services with a target replica set count of 9. * */ @JsonProperty(value = "reliabilityLevel") @@ -133,24 +122,21 @@ public final class ClusterPropertiesUpdateParameters { private ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy; /* - * The upgrade mode of the cluster when new Service Fabric runtime version - * is available. + * The upgrade mode of the cluster when new Service Fabric runtime version is available. */ @JsonProperty(value = "upgradeMode") private UpgradeMode upgradeMode; /* - * This property controls the logical grouping of VMs in upgrade domains - * (UDs). This property can't be modified if a node type with multiple - * Availability Zones is already present in the cluster. + * This property controls the logical grouping of VMs in upgrade domains (UDs). This property can't be modified if + * a node type with multiple Availability Zones is already present in the cluster. */ @JsonProperty(value = "sfZonalUpgradeMode") private SfZonalUpgradeMode sfZonalUpgradeMode; /* - * This property defines the upgrade mode for the virtual machine scale - * set, it is mandatory if a node type with multiple Availability Zones is - * added. + * This property defines the upgrade mode for the virtual machine scale set, it is mandatory if a node type with + * multiple Availability Zones is added. */ @JsonProperty(value = "vmssZonalUpgradeMode") private VmssZonalUpgradeMode vmssZonalUpgradeMode; @@ -162,23 +148,20 @@ public final class ClusterPropertiesUpdateParameters { private Boolean infrastructureServiceManager; /* - * Indicates when new cluster runtime version upgrades will be applied - * after they are released. By default is Wave0. Only applies when - * **upgradeMode** is set to 'Automatic'. + * Indicates when new cluster runtime version upgrades will be applied after they are released. By default is + * Wave0. Only applies when **upgradeMode** is set to 'Automatic'. */ @JsonProperty(value = "upgradeWave") private ClusterUpgradeCadence upgradeWave; /* - * The start timestamp to pause runtime version upgrades on the cluster - * (UTC). + * The start timestamp to pause runtime version upgrades on the cluster (UTC). */ @JsonProperty(value = "upgradePauseStartTimestampUtc") private OffsetDateTime upgradePauseStartTimestampUtc; /* - * The end timestamp of pause runtime version upgrades on the cluster - * (UTC). + * The end timestamp of pause runtime version upgrades on the cluster (UTC). */ @JsonProperty(value = "upgradePauseEndTimestampUtc") private OffsetDateTime upgradePauseEndTimestampUtc; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterVersionDetails.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterVersionDetails.java index 4624f806dd6c..979a9e6181b7 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterVersionDetails.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ClusterVersionDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.ClusterEnvironment; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The detail of the Service Fabric runtime version result. */ @Fluent public final class ClusterVersionDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterVersionDetails.class); - /* * The Service Fabric runtime version of the cluster. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java index 47088fc77591..e9ceef290798 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/OperationResultInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.AvailableOperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Available operation list result. */ @Fluent public final class OperationResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultInner.class); - /* * The name of the operation. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java index 9b1a0478187d..f1ce1317d4da 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceInner.java @@ -7,14 +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.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode; import com.azure.resourcemanager.servicefabric.models.MoveCost; import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription; import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription; import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription; import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -23,8 +21,6 @@ /** The service resource. */ @Fluent public final class ServiceResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceInner.class); - /* * The service resource properties. */ @@ -32,8 +28,7 @@ public final class ServiceResourceInner extends ProxyResource { private ServiceResourceProperties innerProperties; /* - * It will be deprecated in New API, resource location depends on the - * parent resource. + * It will be deprecated in New API, resource location depends on the parent resource. */ @JsonProperty(value = "location") private String location; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceListInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceListInner.java index beaaa753f70b..41c87290628d 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceListInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceListInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.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; /** The list of service resources. */ @Fluent public final class ServiceResourceListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceListInner.class); - /* * The value property. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceProperties.java index 1738e6a22760..42ab14aa299e 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode; import com.azure.resourcemanager.servicefabric.models.MoveCost; import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription; @@ -15,7 +14,6 @@ import com.azure.resourcemanager.servicefabric.models.ServiceResourcePropertiesBase; import com.azure.resourcemanager.servicefabric.models.StatefulServiceProperties; import com.azure.resourcemanager.servicefabric.models.StatelessServiceProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -35,11 +33,8 @@ }) @Fluent public class ServiceResourceProperties extends ServiceResourcePropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceProperties.class); - /* - * The current deployment or provisioning state, which only appears in the - * response + * The current deployment or provisioning state, which only appears in the response */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; @@ -63,8 +58,8 @@ public class ServiceResourceProperties extends ServiceResourcePropertiesBase { private ArmServicePackageActivationMode servicePackageActivationMode; /* - * Dns name used for the service. If this is specified, then the service - * can be accessed via its DNS name instead of service name. + * Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead + * of service name. */ @JsonProperty(value = "serviceDnsName") private String serviceDnsName; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceUpdateProperties.java index 3816cd8aface..f5e8f598408b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceUpdateProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/ServiceResourceUpdateProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.servicefabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.models.MoveCost; import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription; import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription; @@ -13,7 +12,6 @@ import com.azure.resourcemanager.servicefabric.models.ServiceResourcePropertiesBase; import com.azure.resourcemanager.servicefabric.models.StatefulServiceUpdateProperties; import com.azure.resourcemanager.servicefabric.models.StatelessServiceUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -32,8 +30,6 @@ }) @Fluent public class ServiceResourceUpdateProperties extends ServiceResourcePropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceUpdateProperties.class); - /** {@inheritDoc} */ @Override public ServiceResourceUpdateProperties withPlacementConstraints(String placementConstraints) { diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/UpgradableVersionPathResultInner.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/UpgradableVersionPathResultInner.java index 6dcdfd5f1df1..40cd729bb546 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/UpgradableVersionPathResultInner.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/models/UpgradableVersionPathResultInner.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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; @@ -16,8 +14,6 @@ */ @Fluent public final class UpgradableVersionPathResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpgradableVersionPathResultInner.class); - /* * The supportedPath property. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java index 56f200b45513..4724d7269de5 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java @@ -124,6 +124,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ApplicationResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java index 2365fdac4bf6..91e7c2dcae3f 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java @@ -63,6 +63,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ApplicationTypeResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java index c5e907afcc11..5682a6954de0 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java @@ -78,6 +78,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ApplicationTypeVersionResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsClientImpl.java index 4bd652d7fc18..34ffb3e5c332 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsClientImpl.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.servicefabric.fluent.ApplicationTypeVersionsClient; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in ApplicationTypeVersionsClient. */ public final class ApplicationTypeVersionsClientImpl implements ApplicationTypeVersionsClient { - private final ClientLogger logger = new ClientLogger(ApplicationTypeVersionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ApplicationTypeVersionsService service; @@ -134,8 +131,10 @@ Mono> list( } /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -145,7 +144,8 @@ Mono> list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -195,8 +195,10 @@ private Mono> getWithResponseAsync } /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -207,7 +209,8 @@ private Mono> getWithResponseAsync * @throws 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 Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -254,8 +257,10 @@ private Mono> getWithResponseAsync } /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -265,25 +270,20 @@ private Mono> getWithResponseAsync * @throws 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 Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String clusterName, String applicationTypeName, String version) { return getWithResponseAsync(resourceGroupName, clusterName, applicationTypeName, version) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -302,8 +302,10 @@ public ApplicationTypeVersionResourceInner get( } /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -314,7 +316,7 @@ public ApplicationTypeVersionResourceInner get( * @throws 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 Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -323,7 +325,9 @@ public Response getWithResponse( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -333,7 +337,8 @@ 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 an application type version resource for the specified application type name resource. + * @return an application type version resource for the specified application type name resource along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -393,7 +398,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -404,7 +411,8 @@ 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 an application type version resource for the specified application type name resource. + * @return an application type version resource for the specified application type name resource along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -462,7 +470,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -472,9 +482,10 @@ 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 an application type version resource for the specified application type name resource. + * @return the {@link PollerFlux} for polling of an application type version resource for the specified application + * type name resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationTypeVersionResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -491,11 +502,13 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), ApplicationTypeVersionResourceInner.class, ApplicationTypeVersionResourceInner.class, - Context.NONE); + this.client.getContext()); } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -506,9 +519,10 @@ 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 an application type version resource for the specified application type name resource. + * @return the {@link PollerFlux} for polling of an application type version resource for the specified application + * type name resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationTypeVersionResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -532,7 +546,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -542,9 +558,10 @@ 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 an application type version resource for the specified application type name resource. + * @return the {@link SyncPoller} for polling of an application type version resource for the specified application + * type name resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationTypeVersionResourceInner> beginCreateOrUpdate( String resourceGroupName, @@ -557,7 +574,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -568,9 +587,10 @@ 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 an application type version resource for the specified application type name resource. + * @return the {@link SyncPoller} for polling of an application type version resource for the specified application + * type name resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationTypeVersionResourceInner> beginCreateOrUpdate( String resourceGroupName, @@ -585,7 +605,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -595,7 +617,8 @@ 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 an application type version resource for the specified application type name resource. + * @return an application type version resource for the specified application type name resource on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -610,7 +633,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -621,7 +646,8 @@ 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 an application type version resource for the specified application type name resource. + * @return an application type version resource for the specified application type name resource on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -638,7 +664,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -661,7 +689,9 @@ public ApplicationTypeVersionResourceInner createOrUpdate( } /** - * Create or update a Service Fabric application type version resource with the specified name. + * Creates or updates a Service Fabric application type version resource. + * + *

Create or update a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -687,7 +717,9 @@ public ApplicationTypeVersionResourceInner createOrUpdate( } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -696,7 +728,7 @@ public ApplicationTypeVersionResourceInner 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -746,7 +778,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -756,7 +790,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( @@ -803,7 +837,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -812,20 +848,23 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationTypeName, String version) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, applicationTypeName, version); 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()); } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -835,9 +874,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context) { context = this.client.mergeContext(context); @@ -849,7 +888,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -858,16 +899,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName, String version) { return beginDeleteAsync(resourceGroupName, clusterName, applicationTypeName, version).getSyncPoller(); } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -877,16 +920,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context) { return beginDeleteAsync(resourceGroupName, clusterName, applicationTypeName, version, context).getSyncPoller(); } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -895,7 +940,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( @@ -906,7 +951,9 @@ private Mono deleteAsync( } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -916,7 +963,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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( @@ -927,7 +974,9 @@ private Mono deleteAsync( } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -943,7 +992,9 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -961,7 +1012,10 @@ public void delete( } /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -971,7 +1025,7 @@ public void delete( * @throws 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 application type version resources created or in the process of being created in the Service Fabric - * application type name resource. + * application type name resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -1017,7 +1071,10 @@ private Mono> listWithResponse } /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -1028,7 +1085,7 @@ private Mono> listWithResponse * @throws 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 application type version resources created or in the process of being created in the Service Fabric - * application type name resource. + * application type name resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -1071,7 +1128,10 @@ private Mono> listWithResponse } /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -1081,24 +1141,20 @@ private Mono> listWithResponse * @throws 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 application type version resources created or in the process of being created in the Service Fabric - * application type name resource. + * application type name resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync( String resourceGroupName, String clusterName, String applicationTypeName) { return listWithResponseAsync(resourceGroupName, clusterName, applicationTypeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -1117,7 +1173,10 @@ public ApplicationTypeVersionResourceListInner list( } /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -1128,7 +1187,7 @@ public ApplicationTypeVersionResourceListInner list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all application type version resources created or in the process of being created in the Service Fabric - * application type name resource. + * application type name resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java index 505dc2a6f26c..f5a1cf965b3e 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionResource; import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionResourceList; import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ApplicationTypeVersionsImpl implements ApplicationTypeVersions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeVersionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ApplicationTypeVersionsImpl.class); private final ApplicationTypeVersionsClient innerClient; @@ -94,7 +93,7 @@ public Response listWithResponse( public ApplicationTypeVersionResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -102,14 +101,14 @@ public ApplicationTypeVersionResource 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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -118,7 +117,7 @@ public ApplicationTypeVersionResource getById(String id) { } String version = Utils.getValueFromIdByName(id, "versions"); if (version == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); @@ -131,7 +130,7 @@ public ApplicationTypeVersionResource 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 @@ -139,14 +138,14 @@ public Response getByIdWithResponse(String id, C } 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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -155,7 +154,7 @@ public Response getByIdWithResponse(String id, C } String version = Utils.getValueFromIdByName(id, "versions"); if (version == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); @@ -166,7 +165,7 @@ public Response getByIdWithResponse(String id, C public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -174,14 +173,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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -190,7 +189,7 @@ public void deleteById(String id) { } String version = Utils.getValueFromIdByName(id, "versions"); if (version == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); @@ -201,7 +200,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 @@ -209,14 +208,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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -225,7 +224,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String version = Utils.getValueFromIdByName(id, "versions"); if (version == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesClientImpl.java index ed4f75841b5d..145824461e65 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesClientImpl.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.servicefabric.fluent.ApplicationTypesClient; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in ApplicationTypesClient. */ public final class ApplicationTypesClientImpl implements ApplicationTypesClient { - private final ClientLogger logger = new ClientLogger(ApplicationTypesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ApplicationTypesService service; @@ -129,7 +126,9 @@ Mono> list( } /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -139,7 +138,7 @@ Mono> list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -185,7 +184,9 @@ private Mono> getWithResponseAsync( } /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -196,7 +197,7 @@ private Mono> getWithResponseAsync( * @throws 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 Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -239,7 +240,9 @@ private Mono> getWithResponseAsync( } /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -249,24 +252,19 @@ private Mono> getWithResponseAsync( * @throws 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 Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String clusterName, String applicationTypeName) { return getWithResponseAsync(resourceGroupName, clusterName, applicationTypeName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -284,7 +282,9 @@ public ApplicationTypeResourceInner get(String resourceGroupName, String cluster } /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -295,7 +295,7 @@ public ApplicationTypeResourceInner get(String resourceGroupName, String cluster * @throws 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 Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -304,7 +304,9 @@ public Response getWithResponse( } /** - * Create or update a Service Fabric application type name resource with the specified name. + * Creates or updates a Service Fabric application type name resource. + * + *

Create or update a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -313,7 +315,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 application type name resource. + * @return the application type name resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -368,7 +370,9 @@ private Mono> createOrUpdateWithResponseA } /** - * Create or update a Service Fabric application type name resource with the specified name. + * Creates or updates a Service Fabric application type name resource. + * + *

Create or update a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -378,7 +382,7 @@ private Mono> createOrUpdateWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application type name resource. + * @return the application type name resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -431,7 +435,9 @@ private Mono> createOrUpdateWithResponseA } /** - * Create or update a Service Fabric application type name resource with the specified name. + * Creates or updates a Service Fabric application type name resource. + * + *

Create or update a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -440,7 +446,7 @@ private Mono> createOrUpdateWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application type name resource. + * @return the application type name resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -449,18 +455,13 @@ private Mono createOrUpdateAsync( String applicationTypeName, ApplicationTypeResourceInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, clusterName, applicationTypeName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update a Service Fabric application type name resource with the specified name. + * Creates or updates a Service Fabric application type name resource. + * + *

Create or update a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -481,7 +482,9 @@ public ApplicationTypeResourceInner createOrUpdate( } /** - * Create or update a Service Fabric application type name resource with the specified name. + * Creates or updates a Service Fabric application type name resource. + * + *

Create or update a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -491,7 +494,7 @@ public ApplicationTypeResourceInner 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 application type name resource. + * @return the application type name resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -505,7 +508,9 @@ public Response createOrUpdateWithResponse( } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -513,7 +518,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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( @@ -559,7 +564,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -568,7 +575,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( @@ -611,7 +618,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -619,20 +628,23 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationTypeName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, applicationTypeName); 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()); } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -641,9 +653,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationTypeName, Context context) { context = this.client.mergeContext(context); @@ -655,7 +667,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -663,16 +677,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName) { return beginDeleteAsync(resourceGroupName, clusterName, applicationTypeName).getSyncPoller(); } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -681,16 +697,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationTypeName, Context context) { return beginDeleteAsync(resourceGroupName, clusterName, applicationTypeName, context).getSyncPoller(); } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -698,7 +716,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 applicationTypeName) { @@ -708,7 +726,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -717,7 +737,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( @@ -728,7 +748,9 @@ private Mono deleteAsync( } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -743,7 +765,9 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -759,8 +783,10 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -768,7 +794,7 @@ public void delete(String resourceGroupName, String clusterName, String applicat * @throws 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 application type name resources created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -809,8 +835,10 @@ private Mono> listWithResponseAsync( } /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -819,7 +847,7 @@ private Mono> listWithResponseAsync( * @throws 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 application type name resources created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -857,8 +885,10 @@ private Mono> listWithResponseAsync( } /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -866,24 +896,18 @@ private Mono> listWithResponseAsync( * @throws 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 application type name resources created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource 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())); } /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -899,8 +923,10 @@ public ApplicationTypeResourceListInner list(String resourceGroupName, String cl } /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -909,7 +935,7 @@ public ApplicationTypeResourceListInner list(String resourceGroupName, String cl * @throws 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 application type name resources created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java index 86eae1f35594..4275faa74a2e 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.servicefabric.models.ApplicationTypeResource; import com.azure.resourcemanager.servicefabric.models.ApplicationTypeResourceList; import com.azure.resourcemanager.servicefabric.models.ApplicationTypes; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ApplicationTypesImpl implements ApplicationTypes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ApplicationTypesImpl.class); private final ApplicationTypesClient innerClient; @@ -90,7 +89,7 @@ public Response listWithResponse( public ApplicationTypeResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -98,14 +97,14 @@ public ApplicationTypeResource 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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -118,7 +117,7 @@ public ApplicationTypeResource 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 @@ -126,14 +125,14 @@ public Response getByIdWithResponse(String id, 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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -146,7 +145,7 @@ public Response getByIdWithResponse(String id, Context public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -154,14 +153,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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -174,7 +173,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 @@ -182,14 +181,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 applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsClientImpl.java index 75ac636303db..cbe1091dd66b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsClientImpl.java @@ -26,7 +26,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.servicefabric.fluent.ApplicationsClient; @@ -39,8 +38,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; @@ -148,7 +145,9 @@ Mono> list( } /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -158,7 +157,7 @@ Mono> list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -204,7 +203,9 @@ private Mono> getWithResponseAsync( } /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -215,7 +216,7 @@ private Mono> getWithResponseAsync( * @throws 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 Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -258,7 +259,9 @@ private Mono> getWithResponseAsync( } /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -268,24 +271,19 @@ private Mono> getWithResponseAsync( * @throws 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 Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource 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())); } /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -303,7 +301,9 @@ public ApplicationResourceInner get(String resourceGroupName, String clusterName } /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -314,7 +314,7 @@ public ApplicationResourceInner get(String resourceGroupName, String clusterName * @throws 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 Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -323,7 +323,9 @@ public Response getWithResponse( } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -332,7 +334,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 application resource. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -384,7 +386,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -394,7 +398,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 application resource. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -447,7 +451,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -456,9 +462,9 @@ 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 application resource. + * @return the {@link PollerFlux} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters) { Mono>> mono = @@ -470,11 +476,13 @@ private PollerFlux, ApplicationResourceInne this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, - Context.NONE); + this.client.getContext()); } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -484,9 +492,9 @@ private PollerFlux, ApplicationResourceInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link PollerFlux} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterName, @@ -507,7 +515,9 @@ private PollerFlux, ApplicationResourceInne } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -516,16 +526,18 @@ private PollerFlux, ApplicationResourceInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).getSyncPoller(); } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -535,9 +547,9 @@ public SyncPoller, ApplicationResourceInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, @@ -549,7 +561,9 @@ public SyncPoller, ApplicationResourceInner } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -558,7 +572,7 @@ public SyncPoller, ApplicationResourceInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the application resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -569,7 +583,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -579,7 +595,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 application resource. + * @return the application resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -594,7 +610,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -612,7 +630,9 @@ public ApplicationResourceInner createOrUpdate( } /** - * Create or update a Service Fabric application resource with the specified name. + * Creates or updates a Service Fabric application resource. + * + *

Create or update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -635,7 +655,9 @@ public ApplicationResourceInner createOrUpdate( } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -644,7 +666,7 @@ public ApplicationResourceInner 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 application resource. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -696,7 +718,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -706,7 +730,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 application resource. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -759,7 +783,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -768,9 +794,9 @@ 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 application resource. + * @return the {@link PollerFlux} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationResourceInner> beginUpdateAsync( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceUpdate parameters) { Mono>> mono = @@ -782,11 +808,13 @@ private PollerFlux, ApplicationResourceInne this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, - Context.NONE); + this.client.getContext()); } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -796,9 +824,9 @@ private PollerFlux, ApplicationResourceInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link PollerFlux} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplicationResourceInner> beginUpdateAsync( String resourceGroupName, String clusterName, @@ -819,7 +847,9 @@ private PollerFlux, ApplicationResourceInne } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -828,16 +858,18 @@ private PollerFlux, ApplicationResourceInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationResourceInner> beginUpdate( String resourceGroupName, String clusterName, String applicationName, ApplicationResourceUpdate parameters) { return beginUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).getSyncPoller(); } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -847,9 +879,9 @@ public SyncPoller, ApplicationResourceInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationResourceInner> beginUpdate( String resourceGroupName, String clusterName, @@ -860,7 +892,9 @@ public SyncPoller, ApplicationResourceInner } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -869,7 +903,7 @@ public SyncPoller, ApplicationResourceInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the application resource. + * @return the application resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -880,7 +914,9 @@ private Mono updateAsync( } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -890,7 +926,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 application resource. + * @return the application resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -905,7 +941,9 @@ private Mono updateAsync( } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -923,7 +961,9 @@ public ApplicationResourceInner update( } /** - * Update a Service Fabric application resource with the specified name. + * Updates a Service Fabric application resource. + * + *

Update a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -946,7 +986,9 @@ public ApplicationResourceInner update( } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -954,7 +996,7 @@ public ApplicationResourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1000,7 +1042,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1009,7 +1053,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( @@ -1052,7 +1096,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1060,20 +1106,23 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationName) { Mono>> mono = 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()); } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1082,9 +1131,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationName, Context context) { context = this.client.mergeContext(context); @@ -1096,7 +1145,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1104,16 +1155,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName) { return beginDeleteAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1122,16 +1175,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName, Context context) { return beginDeleteAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1139,7 +1194,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) { @@ -1149,7 +1204,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1158,7 +1215,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( @@ -1169,7 +1226,9 @@ private Mono deleteAsync( } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1184,7 +1243,9 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1200,7 +1261,10 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1208,7 +1272,7 @@ public void delete(String resourceGroupName, String clusterName, String applicat * @throws 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 application resources created or in the process of being created in the Service Fabric cluster - * resource. + * resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -1249,7 +1313,10 @@ private Mono> listWithResponseAsync( } /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1258,7 +1325,7 @@ private Mono> listWithResponseAsync( * @throws 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 application resources created or in the process of being created in the Service Fabric cluster - * resource. + * resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -1296,7 +1363,10 @@ private Mono> listWithResponseAsync( } /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1304,23 +1374,18 @@ private Mono> listWithResponseAsync( * @throws 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 application resources created or in the process of being created in the Service Fabric cluster - * resource. + * resource 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())); } /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1336,7 +1401,10 @@ public ApplicationResourceListInner list(String resourceGroupName, String cluste } /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1345,7 +1413,7 @@ public ApplicationResourceListInner list(String resourceGroupName, String cluste * @throws 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 application resources created or in the process of being created in the Service Fabric cluster - * resource. + * resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java index 773a2320b600..d9875648543d 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.servicefabric.models.ApplicationResource; import com.azure.resourcemanager.servicefabric.models.ApplicationResourceList; import com.azure.resourcemanager.servicefabric.models.Applications; -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; @@ -88,7 +87,7 @@ public Response listWithResponse( public ApplicationResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -96,14 +95,14 @@ public ApplicationResource 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))); @@ -114,7 +113,7 @@ public ApplicationResource 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 @@ -122,14 +121,14 @@ public Response getByIdWithResponse(String id, Context cont } 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))); @@ -140,7 +139,7 @@ public Response getByIdWithResponse(String id, Context cont public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -148,14 +147,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))); @@ -166,7 +165,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 @@ -174,14 +173,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/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java index b38b57ff0832..10b562c01a64 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java @@ -247,6 +247,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ClusterInner innerModel() { return this.innerObject; } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsClientImpl.java index c116f5a671e9..db1070eb5579 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsClientImpl.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.servicefabric.fluent.ClusterVersionsClient; import com.azure.resourcemanager.servicefabric.fluent.models.ClusterCodeVersionsListResultInner; import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment; @@ -29,8 +28,6 @@ /** An instance of this class provides access to all the operations defined in ClusterVersionsClient. */ public final class ClusterVersionsClientImpl implements ClusterVersionsClient { - private final ClientLogger logger = new ClientLogger(ClusterVersionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ClusterVersionsService service; @@ -115,14 +112,17 @@ Mono> listByEnvironment( } /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version. + * @return information about an available Service Fabric cluster code version along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -162,7 +162,9 @@ private Mono> getWithResponseAsync( } /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. @@ -170,7 +172,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 information about an available Service Fabric cluster code version. + * @return information about an available Service Fabric cluster code version along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -207,30 +210,27 @@ private Mono> getWithResponseAsync( } /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version. + * @return information about an available Service Fabric cluster code version on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String clusterVersion) { - return getWithResponseAsync(location, clusterVersion) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(location, clusterVersion).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. @@ -245,7 +245,9 @@ public ClusterCodeVersionsListResultInner get(String location, String clusterVer } /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. @@ -253,7 +255,7 @@ public ClusterCodeVersionsListResultInner get(String location, String clusterVer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version. + * @return information about an available Service Fabric cluster code version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -262,7 +264,9 @@ public Response getWithResponse( } /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -270,7 +274,8 @@ 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 information about an available Service Fabric cluster code version by environment. + * @return information about an available Service Fabric cluster code version by environment along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByEnvironmentWithResponseAsync( @@ -314,7 +319,9 @@ private Mono> getByEnvironmentWithR } /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -323,7 +330,8 @@ private Mono> getByEnvironmentWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment. + * @return information about an available Service Fabric cluster code version by environment along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByEnvironmentWithResponseAsync( @@ -364,7 +372,9 @@ private Mono> getByEnvironmentWithR } /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -372,24 +382,20 @@ private Mono> getByEnvironmentWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment. + * @return information about an available Service Fabric cluster code version by environment on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByEnvironmentAsync( String location, ClusterVersionsEnvironment environment, String clusterVersion) { return getByEnvironmentWithResponseAsync(location, environment, clusterVersion) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -406,7 +412,9 @@ public ClusterCodeVersionsListResultInner getByEnvironment( } /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -415,7 +423,8 @@ public ClusterCodeVersionsListResultInner getByEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment. + * @return information about an available Service Fabric cluster code version by environment along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByEnvironmentWithResponse( @@ -424,13 +433,16 @@ public Response getByEnvironmentWithResponse } /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by location. + * @return all available code versions for Service Fabric cluster resources by location along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String location) { @@ -465,14 +477,17 @@ private Mono> listWithResponseAsync } /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @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 available code versions for Service Fabric cluster resources by location. + * @return all available code versions for Service Fabric cluster resources by location along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String location, Context context) { @@ -504,29 +519,26 @@ private Mono> listWithResponseAsync } /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by location. + * @return all available code versions for Service Fabric cluster resources by location on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String location) { - return listWithResponseAsync(location) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -540,14 +552,16 @@ public ClusterCodeVersionsListResultInner list(String location) { } /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @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 available code versions for Service Fabric cluster resources by location. + * @return all available code versions for Service Fabric cluster resources by location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(String location, Context context) { @@ -555,14 +569,17 @@ public Response listWithResponse(String loca } /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 available code versions for Service Fabric cluster resources by environment. + * @return all available code versions for Service Fabric cluster resources by environment along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByEnvironmentWithResponseAsync( @@ -602,7 +619,9 @@ private Mono> listByEnvironmentWith } /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -610,7 +629,8 @@ private Mono> listByEnvironmentWith * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 available code versions for Service Fabric cluster resources by environment. + * @return all available code versions for Service Fabric cluster resources by environment along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByEnvironmentWithResponseAsync( @@ -647,31 +667,29 @@ private Mono> listByEnvironmentWith } /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 available code versions for Service Fabric cluster resources by environment. + * @return all available code versions for Service Fabric cluster resources by environment on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listByEnvironmentAsync( String location, ClusterVersionsEnvironment environment) { return listByEnvironmentWithResponseAsync(location, environment) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -687,7 +705,9 @@ public ClusterCodeVersionsListResultInner listByEnvironment( } /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -695,7 +715,8 @@ public ClusterCodeVersionsListResultInner listByEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 available code versions for Service Fabric cluster resources by environment. + * @return all available code versions for Service Fabric cluster resources by environment along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listByEnvironmentWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsImpl.java index 1f723b29b8fd..15f4539eb541 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterVersionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.servicefabric.models.ClusterCodeVersionsListResult; import com.azure.resourcemanager.servicefabric.models.ClusterVersions; import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ClusterVersionsImpl implements ClusterVersions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterVersionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ClusterVersionsImpl.class); private final ClusterVersionsClient innerClient; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java index 993c0e356f67..ca9aaa3e34b4 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java @@ -27,7 +27,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.servicefabric.fluent.ClustersClient; @@ -42,8 +41,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; @@ -172,7 +169,10 @@ Mono> listUpgradableVersions( } /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -180,7 +180,7 @@ Mono> listUpgradableVersions( * @throws 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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -221,7 +221,10 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -230,7 +233,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws 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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -268,7 +271,10 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -276,23 +282,19 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws 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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group 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())); } /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -308,7 +310,10 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN } /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -317,7 +322,7 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN * @throws 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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -326,7 +331,9 @@ public Response getByResourceGroupWithResponse( } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -334,7 +341,7 @@ 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 cluster resource. + * @return the cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -381,7 +388,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -390,7 +399,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 cluster resource. + * @return the cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -434,7 +443,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -442,9 +453,9 @@ 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 cluster resource. + * @return the {@link PollerFlux} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterName, ClusterInner parameters) { Mono>> mono = @@ -452,11 +463,13 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs 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()); } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -465,9 +478,9 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster resource. + * @return the {@link PollerFlux} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterName, ClusterInner parameters, Context context) { context = this.client.mergeContext(context); @@ -480,7 +493,9 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -488,16 +503,18 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, ClusterInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -506,16 +523,18 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, ClusterInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -523,7 +542,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster resource. + * @return the cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -534,7 +553,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -543,7 +564,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 cluster resource. + * @return the cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -554,7 +575,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -570,7 +593,9 @@ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, } /** - * Create or update a Service Fabric cluster resource with the specified name. + * Creates or updates a Service Fabric cluster resource. + * + *

Create or update a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -588,7 +613,9 @@ public ClusterInner createOrUpdate( } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -597,7 +624,7 @@ public ClusterInner 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 cluster resource. + * @return the cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -644,7 +671,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -654,7 +683,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 cluster resource. + * @return the cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -698,7 +727,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -707,20 +738,22 @@ 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 cluster resource. + * @return the {@link PollerFlux} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginUpdateAsync( String resourceGroupName, String clusterName, ClusterUpdateParameters parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters); 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()); } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -730,9 +763,9 @@ private PollerFlux, ClusterInner> 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 cluster resource. + * @return the {@link PollerFlux} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ClusterInner> beginUpdateAsync( String resourceGroupName, String clusterName, ClusterUpdateParameters parameters, Context context) { context = this.client.mergeContext(context); @@ -745,7 +778,9 @@ private PollerFlux, ClusterInner> beginUpdateAsync( } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -754,16 +789,18 @@ private PollerFlux, ClusterInner> 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 cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginUpdate( String resourceGroupName, String clusterName, ClusterUpdateParameters parameters) { return beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -773,16 +810,18 @@ public SyncPoller, ClusterInner> 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 cluster resource. + * @return the {@link SyncPoller} for polling of the cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginUpdate( String resourceGroupName, String clusterName, ClusterUpdateParameters parameters, Context context) { return beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -791,7 +830,7 @@ public SyncPoller, ClusterInner> 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 cluster resource. + * @return the cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -802,7 +841,9 @@ private Mono updateAsync( } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -812,7 +853,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 cluster resource. + * @return the cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -823,7 +864,9 @@ private Mono updateAsync( } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -840,7 +883,9 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster } /** - * Update the configuration of a Service Fabric cluster resource with the specified name. + * Updates the configuration of a Service Fabric cluster resource. + * + *

Update the configuration of a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -859,14 +904,16 @@ public ClusterInner update( } /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster 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(String resourceGroupName, String clusterName) { @@ -906,7 +953,9 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -914,7 +963,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -952,22 +1001,26 @@ private Mono> deleteWithResponseAsync( } /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster 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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterName) { - return deleteWithResponseAsync(resourceGroupName, clusterName).flatMap((Response res) -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, clusterName).flatMap(ignored -> Mono.empty()); } /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -981,7 +1034,9 @@ public void delete(String resourceGroupName, String clusterName) { } /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -989,7 +1044,7 @@ public void delete(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 response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) { @@ -997,13 +1052,16 @@ public Response deleteWithResponse(String resourceGroupName, String cluste } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Service Fabric cluster resources created or in the process of being created in the resource group. + * @return all Service Fabric cluster resources created or in the process of being created in the resource group + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupWithResponseAsync(String resourceGroupName) { @@ -1039,14 +1097,17 @@ private Mono> listByResourceGroupWithResponseAs } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @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 Service Fabric cluster resources created or in the process of being created in the resource group. + * @return all Service Fabric cluster resources created or in the process of being created in the resource group + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupWithResponseAsync( @@ -1080,29 +1141,26 @@ private Mono> listByResourceGroupWithResponseAs } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Service Fabric cluster resources created or in the process of being created in the resource group. + * @return all Service Fabric cluster resources created or in the process of being created in the resource group on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listByResourceGroupAsync(String resourceGroupName) { - return listByResourceGroupWithResponseAsync(resourceGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listByResourceGroupWithResponseAsync(resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1116,14 +1174,17 @@ public ClusterListResultInner listByResourceGroup(String resourceGroupName) { } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @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 Service Fabric cluster resources created or in the process of being created in the resource group. + * @return all Service Fabric cluster resources created or in the process of being created in the resource group + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listByResourceGroupWithResponse(String resourceGroupName, Context context) { @@ -1131,11 +1192,14 @@ public Response listByResourceGroupWithResponse(String r } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the subscription. + * @return all Service Fabric cluster resources created or in the process of being created in the subscription along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { @@ -1166,13 +1230,16 @@ private Mono> listWithResponseAsync() { } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the subscription. + * @return all Service Fabric cluster resources created or in the process of being created in the subscription along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { @@ -1200,27 +1267,24 @@ private Mono> listWithResponseAsync(Context con } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the subscription. + * @return all Service Fabric cluster resources created or in the process of being created in the subscription on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync() { - return listWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1232,13 +1296,16 @@ public ClusterListResultInner list() { } /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the subscription. + * @return all Service Fabric cluster resources created or in the process of being created in the subscription along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(Context context) { @@ -1246,7 +1313,10 @@ public Response listWithResponse(Context context) { } /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1256,7 +1326,8 @@ public Response listWithResponse(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 list of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listUpgradableVersionsWithResponseAsync( @@ -1301,7 +1372,10 @@ private Mono> listUpgradableVersionsW } /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1312,7 +1386,8 @@ private Mono> listUpgradableVersionsW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listUpgradableVersionsWithResponseAsync( @@ -1357,7 +1432,10 @@ private Mono> listUpgradableVersionsW } /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1367,24 +1445,21 @@ private Mono> listUpgradableVersionsW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listUpgradableVersionsAsync( String resourceGroupName, String clusterName, UpgradableVersionsDescription versionsDescription) { return listUpgradableVersionsWithResponseAsync(resourceGroupName, clusterName, versionsDescription) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1393,25 +1468,22 @@ private Mono listUpgradableVersionsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listUpgradableVersionsAsync( String resourceGroupName, String clusterName) { final UpgradableVersionsDescription versionsDescription = null; return listUpgradableVersionsWithResponseAsync(resourceGroupName, clusterName, versionsDescription) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1429,7 +1501,10 @@ public UpgradableVersionPathResultInner listUpgradableVersions(String resourceGr } /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1440,7 +1515,7 @@ public UpgradableVersionPathResultInner listUpgradableVersions(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listUpgradableVersionsWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java index c402ca8028e0..441cf0464670 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java @@ -17,10 +17,9 @@ import com.azure.resourcemanager.servicefabric.models.Clusters; import com.azure.resourcemanager.servicefabric.models.UpgradableVersionPathResult; import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription; -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; @@ -142,7 +141,7 @@ public Response listUpgradableVersionsWithResponse( public Cluster getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -150,7 +149,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))); @@ -161,7 +160,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 @@ -169,7 +168,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))); @@ -180,7 +179,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 @@ -188,18 +187,18 @@ 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))); } - this.deleteWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, clusterName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -207,7 +206,7 @@ public Response 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/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsClientImpl.java index 6a77db5cd69c..5da046b0faa8 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/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.servicefabric.fluent.OperationsClient; import com.azure.resourcemanager.servicefabric.fluent.models.OperationResultInner; import com.azure.resourcemanager.servicefabric.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; @@ -81,11 +78,14 @@ Mono> listNext( } /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @throws ManagementException 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 of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -112,13 +112,16 @@ private Mono> listSinglePageAsync() { } /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -144,11 +147,14 @@ private Mono> listSinglePageAsync(Context co } /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @throws ManagementException 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 of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -156,13 +162,16 @@ private PagedFlux listAsync() { } /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -171,11 +180,14 @@ private PagedFlux listAsync(Context context) { } /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @throws ManagementException 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 of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -183,13 +195,16 @@ public PagedIterable list() { } /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +218,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the result of the request to list Service Fabric resource provider operations. + * @return describes the result of the request to list Service Fabric resource provider operations along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +255,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the result of the request to list Service Fabric resource provider operations. + * @return describes the result of the request to list Service Fabric resource provider 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/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java index 8e6ec8b7e955..df57617b4d5c 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.servicefabric.fluent.models.OperationResultInner; import com.azure.resourcemanager.servicefabric.models.OperationResult; import com.azure.resourcemanager.servicefabric.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/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientBuilder.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientBuilder.java index fd8d954df1fe..e9f3a8889253 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientBuilder.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public ServiceFabricManagementClientBuilder environment(AzureEnvironment environ } /* - * 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 ServiceFabricManagementClientBuilder. */ - public ServiceFabricManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public ServiceFabricManagementClientBuilder 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 ServiceFabricManagementClientBuilder. */ - public ServiceFabricManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public ServiceFabricManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -120,27 +119,26 @@ public ServiceFabricManagementClientBuilder serializerAdapter(SerializerAdapter * @return an instance of ServiceFabricManagementClientImpl. */ public ServiceFabricManagementClientImpl 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(); ServiceFabricManagementClientImpl client = new ServiceFabricManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.java index ff234968cbf7..9a6eaf0b261b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceFabricManagementClientImpl.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; @@ -35,15 +36,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 ServiceFabricManagementClientImpl type. */ @ServiceClient(builder = ServiceFabricManagementClientBuilder.class) public final class ServiceFabricManagementClientImpl implements ServiceFabricManagementClient { - private final ClientLogger logger = new ClientLogger(ServiceFabricManagementClientImpl.class); - /** The customer subscription identifier. */ private final String subscriptionId; @@ -248,10 +246,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); } /** @@ -315,7 +310,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -374,4 +369,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceFabricManagementClientImpl.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java index 4112b6fcea61..9723a4ac0ac6 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java @@ -121,6 +121,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ServiceResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesClientImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesClientImpl.java index 0969bee7b4c4..3d71dc187685 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesClientImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesClientImpl.java @@ -26,7 +26,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.servicefabric.fluent.ServicesClient; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in ServicesClient. */ public final class ServicesClientImpl implements ServicesClient { - private final ClientLogger logger = new ClientLogger(ServicesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServicesService service; @@ -152,7 +149,9 @@ Mono> list( } /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -163,7 +162,7 @@ Mono> list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -213,7 +212,9 @@ private Mono> getWithResponseAsync( } /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -225,7 +226,7 @@ private Mono> getWithResponseAsync( * @throws 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 Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -272,7 +273,9 @@ private Mono> getWithResponseAsync( } /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -283,24 +286,19 @@ private Mono> getWithResponseAsync( * @throws 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 Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String clusterName, String applicationName, String serviceName) { return getWithResponseAsync(resourceGroupName, clusterName, applicationName, serviceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -320,7 +318,9 @@ public ServiceResourceInner get( } /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -332,7 +332,7 @@ public ServiceResourceInner get( * @throws 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 Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -341,7 +341,9 @@ public Response getWithResponse( } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -351,7 +353,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 service resource. + * @return the service resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -411,7 +413,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -422,7 +426,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 service resource. + * @return the service resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -480,7 +484,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -490,9 +496,9 @@ 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 service resource. + * @return the {@link PollerFlux} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServiceResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterName, @@ -508,11 +514,13 @@ private PollerFlux, ServiceResourceInner> begin this.client.getHttpPipeline(), ServiceResourceInner.class, ServiceResourceInner.class, - Context.NONE); + this.client.getContext()); } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -523,9 +531,9 @@ private PollerFlux, ServiceResourceInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link PollerFlux} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServiceResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterName, @@ -544,7 +552,9 @@ private PollerFlux, ServiceResourceInner> begin } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -554,9 +564,9 @@ private PollerFlux, ServiceResourceInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServiceResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, @@ -568,7 +578,9 @@ public SyncPoller, ServiceResourceInner> beginC } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -579,9 +591,9 @@ public SyncPoller, ServiceResourceInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServiceResourceInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, @@ -595,7 +607,9 @@ public SyncPoller, ServiceResourceInner> beginC } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -605,7 +619,7 @@ public SyncPoller, ServiceResourceInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the service resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -620,7 +634,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -631,7 +647,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 service resource. + * @return the service resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -648,7 +664,9 @@ private Mono createOrUpdateAsync( } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -671,7 +689,9 @@ public ServiceResourceInner createOrUpdate( } /** - * Create or update a Service Fabric service resource with the specified name. + * Creates or updates a Service Fabric service resource. + * + *

Create or update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -697,7 +717,9 @@ public ServiceResourceInner createOrUpdate( } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -707,7 +729,7 @@ public ServiceResourceInner 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 service resource. + * @return the service resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -767,7 +789,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -778,7 +802,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 service resource. + * @return the service resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -836,7 +860,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -846,9 +872,9 @@ 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 service resource. + * @return the {@link PollerFlux} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServiceResourceInner> beginUpdateAsync( String resourceGroupName, String clusterName, @@ -864,11 +890,13 @@ private PollerFlux, ServiceResourceInner> begin this.client.getHttpPipeline(), ServiceResourceInner.class, ServiceResourceInner.class, - Context.NONE); + this.client.getContext()); } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -879,9 +907,9 @@ private PollerFlux, ServiceResourceInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link PollerFlux} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServiceResourceInner> beginUpdateAsync( String resourceGroupName, String clusterName, @@ -899,7 +927,9 @@ private PollerFlux, ServiceResourceInner> begin } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -909,9 +939,9 @@ private PollerFlux, ServiceResourceInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServiceResourceInner> beginUpdate( String resourceGroupName, String clusterName, @@ -923,7 +953,9 @@ public SyncPoller, ServiceResourceInner> beginU } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -934,9 +966,9 @@ public SyncPoller, ServiceResourceInner> beginU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the {@link SyncPoller} for polling of the service resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServiceResourceInner> beginUpdate( String resourceGroupName, String clusterName, @@ -949,7 +981,9 @@ public SyncPoller, ServiceResourceInner> beginU } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -959,7 +993,7 @@ public SyncPoller, ServiceResourceInner> beginU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the service resource. + * @return the service resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -974,7 +1008,9 @@ private Mono updateAsync( } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -985,7 +1021,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 service resource. + * @return the service resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1001,7 +1037,9 @@ private Mono updateAsync( } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1024,7 +1062,9 @@ public ServiceResourceInner update( } /** - * Update a Service Fabric service resource with the specified name. + * Updates a Service Fabric service resource. + * + *

Update a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1049,7 +1089,9 @@ public ServiceResourceInner update( } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1058,7 +1100,7 @@ public ServiceResourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1108,7 +1150,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1118,7 +1162,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( @@ -1165,7 +1209,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1174,20 +1220,23 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationName, String serviceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, applicationName, serviceName); 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()); } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1197,9 +1246,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context) { context = this.client.mergeContext(context); @@ -1211,7 +1260,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1220,16 +1271,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName, String serviceName) { return beginDeleteAsync(resourceGroupName, clusterName, applicationName, serviceName).getSyncPoller(); } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1239,16 +1292,18 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context) { return beginDeleteAsync(resourceGroupName, clusterName, applicationName, serviceName, context).getSyncPoller(); } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1257,7 +1312,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( @@ -1268,7 +1323,9 @@ private Mono deleteAsync( } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1278,7 +1335,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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( @@ -1289,7 +1346,9 @@ private Mono deleteAsync( } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1305,7 +1364,9 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1323,7 +1384,10 @@ public void delete( } /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1332,7 +1396,7 @@ public void delete( * @throws 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 service resources created or in the process of being created in the Service Fabric application - * resource. + * resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -1378,7 +1442,10 @@ private Mono> listWithResponseAsync( } /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1388,7 +1455,7 @@ private Mono> listWithResponseAsync( * @throws 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 service resources created or in the process of being created in the Service Fabric application - * resource. + * resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -1431,7 +1498,10 @@ private Mono> listWithResponseAsync( } /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1440,24 +1510,20 @@ private Mono> listWithResponseAsync( * @throws 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 service resources created or in the process of being created in the Service Fabric application - * resource. + * resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync( String resourceGroupName, String clusterName, String applicationName) { return listWithResponseAsync(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())); } /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1474,7 +1540,10 @@ public ServiceResourceListInner list(String resourceGroupName, String clusterNam } /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -1484,7 +1553,7 @@ public ServiceResourceListInner list(String resourceGroupName, String clusterNam * @throws 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 service resources created or in the process of being created in the Service Fabric application - * resource. + * resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java index 4f34d2b8706e..5b3b418f22db 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.servicefabric.models.ServiceResource; import com.azure.resourcemanager.servicefabric.models.ServiceResourceList; import com.azure.resourcemanager.servicefabric.models.Services; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServicesImpl implements Services { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServicesImpl.class); private final ServicesClient innerClient; @@ -91,7 +90,7 @@ public Response listWithResponse( public ServiceResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -99,21 +98,21 @@ public ServiceResource 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))); } String serviceName = Utils.getValueFromIdByName(id, "services"); if (serviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); @@ -126,7 +125,7 @@ public ServiceResource 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 @@ -134,21 +133,21 @@ 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))); } String serviceName = Utils.getValueFromIdByName(id, "services"); if (serviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", 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,21 +166,21 @@ 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))); } String serviceName = Utils.getValueFromIdByName(id, "services"); if (serviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); @@ -192,7 +191,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 @@ -200,21 +199,21 @@ 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))); } String serviceName = Utils.getValueFromIdByName(id, "services"); if (serviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AddOnFeatures.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AddOnFeatures.java index d1f1560ed415..1f388e6ea955 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AddOnFeatures.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AddOnFeatures.java @@ -33,7 +33,11 @@ public static AddOnFeatures fromString(String name) { return fromString(name, AddOnFeatures.class); } - /** @return known AddOnFeatures values. */ + /** + * Gets known AddOnFeatures values. + * + * @return known AddOnFeatures values. + */ public static Collection values() { return values(AddOnFeatures.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationDeltaHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationDeltaHealthPolicy.java index c88fd92c9d10..24668a3d4c71 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationDeltaHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationDeltaHealthPolicy.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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; @@ -17,18 +15,14 @@ */ @Fluent public final class ApplicationDeltaHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationDeltaHealthPolicy.class); - /* - * The delta health policy used by default to evaluate the health of a - * service type when upgrading the cluster. + * The delta health policy used by default to evaluate the health of a service type when upgrading the cluster. */ @JsonProperty(value = "defaultServiceTypeDeltaHealthPolicy") private ServiceTypeDeltaHealthPolicy defaultServiceTypeDeltaHealthPolicy; /* - * The map with service type delta health policy per service type name. The - * map is empty by default. + * The map with service type delta health policy per service type name. The map is empty by default. */ @JsonProperty(value = "serviceTypeDeltaHealthPolicies") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationHealthPolicy.java index 0d03e8ffcd7f..3fe1d209ec87 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationHealthPolicy.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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,18 +12,14 @@ /** Defines a health policy used to evaluate the health of an application or one of its children entities. */ @Fluent public final class ApplicationHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationHealthPolicy.class); - /* - * The health policy used by default to evaluate the health of a service - * type. + * The health policy used by default to evaluate the health of a service type. */ @JsonProperty(value = "defaultServiceTypeHealthPolicy") private ServiceTypeHealthPolicy defaultServiceTypeHealthPolicy; /* - * The map with service type health policy per service type name. The map - * is empty by default. + * The map with service type health policy per service type name. The map is empty by default. */ @JsonProperty(value = "serviceTypeHealthPolicies") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationMetricDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationMetricDescription.java index 3d53026eedb7..f778c407679b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationMetricDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationMetricDescription.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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; /** @@ -15,8 +13,6 @@ */ @Fluent public final class ApplicationMetricDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationMetricDescription.class); - /* * The name of the metric. */ @@ -25,17 +21,14 @@ public final class ApplicationMetricDescription { /* * The maximum node capacity for Service Fabric application. - * This is the maximum Load for an instance of this application on a single - * node. Even if the capacity of node is greater than this value, Service - * Fabric will limit the total load of services within the application on - * each node to this value. + * This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is + * greater than this value, Service Fabric will limit the total load of services within the application on each + * node to this value. * If set to zero, capacity for this metric is unlimited on each node. - * When creating a new application with application capacity defined, the - * product of MaximumNodes and this value must always be smaller than or - * equal to TotalApplicationCapacity. - * When updating existing application with application capacity, the - * product of MaximumNodes and this value must always be smaller than or - * equal to TotalApplicationCapacity. + * When creating a new application with application capacity defined, the product of MaximumNodes and this value + * must always be smaller than or equal to TotalApplicationCapacity. + * When updating existing application with application capacity, the product of MaximumNodes and this value must + * always be smaller than or equal to TotalApplicationCapacity. * */ @JsonProperty(value = "maximumCapacity") @@ -43,14 +36,12 @@ public final class ApplicationMetricDescription { /* * The node reservation capacity for Service Fabric application. - * This is the amount of load which is reserved on nodes which have - * instances of this application. - * If MinimumNodes is specified, then the product of these values will be - * the capacity reserved in the cluster for the application. + * This is the amount of load which is reserved on nodes which have instances of this application. + * If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for + * the application. * If set to zero, no capacity is reserved for this metric. - * When setting application capacity or when updating application capacity; - * this value must be smaller than or equal to MaximumCapacity for each - * metric. + * When setting application capacity or when updating application capacity; this value must be smaller than or + * equal to MaximumCapacity for each metric. * */ @JsonProperty(value = "reservationCapacity") @@ -58,12 +49,10 @@ public final class ApplicationMetricDescription { /* * The total metric capacity for Service Fabric application. - * This is the total metric capacity for this application in the cluster. - * Service Fabric will try to limit the sum of loads of services within the - * application to this value. - * When creating a new application with application capacity defined, the - * product of MaximumNodes and MaximumCapacity must always be smaller than - * or equal to this value. + * This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum + * of loads of services within the application to this value. + * When creating a new application with application capacity defined, the product of MaximumNodes and + * MaximumCapacity must always be smaller than or equal to this value. * */ @JsonProperty(value = "totalApplicationCapacity") diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java index 434458b67557..551a07741ee8 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResource.java @@ -161,6 +161,13 @@ public interface ApplicationResource { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceInner object. * diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java index 79e85f723ecb..548dfe2ad26c 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationResourceUpdate.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.servicefabric.fluent.models.ApplicationResourceUpdateProperties; -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 application resource for patch operations. */ @Fluent public final class ApplicationResourceUpdate extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationResourceUpdate.class); - /* * The application resource properties for patch operations. */ @@ -27,8 +23,7 @@ public final class ApplicationResourceUpdate extends ProxyResource { private ApplicationResourceUpdateProperties innerProperties; /* - * It will be deprecated in New API, resource location depends on the - * parent resource. + * It will be deprecated in New API, resource location depends on the parent resource. */ @JsonProperty(value = "location") private String location; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java index d9c5971f8cd0..ce8030e6dc6a 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeResource.java @@ -83,6 +83,13 @@ public interface ApplicationTypeResource { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceInner object. * diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java index 77af962f0088..6dbfadae2e5a 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionResource.java @@ -98,6 +98,13 @@ public interface ApplicationTypeVersionResource { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceInner object. * diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersions.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersions.java index c49a0cef773e..5f588b9ecd79 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersions.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersions.java @@ -10,8 +10,10 @@ /** Resource collection API of ApplicationTypeVersions. */ public interface ApplicationTypeVersions { /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -27,8 +29,10 @@ ApplicationTypeVersionResource get( String resourceGroupName, String clusterName, String applicationTypeName, String version); /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -39,13 +43,15 @@ ApplicationTypeVersionResource get( * @throws com.azure.core.management.exception.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 Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -58,7 +64,9 @@ Response getWithResponse( void delete(String resourceGroupName, String clusterName, String applicationTypeName, String version); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -73,7 +81,10 @@ void delete( String resourceGroupName, String clusterName, String applicationTypeName, String version, Context context); /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -88,7 +99,10 @@ void delete( ApplicationTypeVersionResourceList list(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Gets all application type version resources created or in the process of being created in the Service Fabric + * Gets the list of application type version resources created in the specified Service Fabric application type name + * resource. + * + *

Gets all application type version resources created or in the process of being created in the Service Fabric * application type name resource. * * @param resourceGroupName The name of the resource group. @@ -99,27 +113,31 @@ void delete( * @throws com.azure.core.management.exception.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 application type version resources created or in the process of being created in the Service Fabric - * application type name resource. + * application type name resource along with {@link Response}. */ Response listWithResponse( String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource along with {@link Response}. */ ApplicationTypeVersionResource getById(String id); /** - * Get a Service Fabric application type version resource created or in the process of being created in the Service - * Fabric application type name resource. + * Gets a Service Fabric application type version resource. + * + *

Get a Service Fabric application type version resource created or in the process of being created in the + * Service Fabric application type name resource. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -127,12 +145,14 @@ Response listWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric application type version resource created or in the process of being created in the - * Service Fabric application type name resource. + * Service Fabric application type name resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,7 +162,9 @@ Response listWithResponse( void deleteById(String id); /** - * Delete a Service Fabric application type version resource with the specified name. + * Deletes a Service Fabric application type version resource. + * + *

Delete a Service Fabric application type version resource with the specified name. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionsCleanupPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionsCleanupPolicy.java index 5327b321c3fe..f3b15acfd907 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionsCleanupPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypeVersionsCleanupPolicy.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.servicefabric.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 ApplicationTypeVersionsCleanupPolicy model. */ @Fluent public final class ApplicationTypeVersionsCleanupPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationTypeVersionsCleanupPolicy.class); - /* * Number of unused versions per application type to keep. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypes.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypes.java index 51efe6cff545..74a85f0b47c9 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypes.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationTypes.java @@ -10,7 +10,9 @@ /** Resource collection API of ApplicationTypes. */ public interface ApplicationTypes { /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -25,7 +27,9 @@ public interface ApplicationTypes { ApplicationTypeResource get(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param resourceGroupName The name of the resource group. @@ -36,13 +40,15 @@ public interface ApplicationTypes { * @throws com.azure.core.management.exception.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 Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -54,7 +60,9 @@ Response getWithResponse( void delete(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -67,8 +75,10 @@ Response getWithResponse( void delete(String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -81,8 +91,10 @@ Response getWithResponse( ApplicationTypeResourceList list(String resourceGroupName, String clusterName); /** - * Gets all application type name resources created or in the process of being created in the Service Fabric cluster - * resource. + * Gets the list of application type name resources created in the specified Service Fabric cluster resource. + * + *

Gets all application type name resources created or in the process of being created in the Service Fabric + * cluster resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -91,13 +103,15 @@ Response getWithResponse( * @throws com.azure.core.management.exception.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 application type name resources created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ Response listWithResponse( String resourceGroupName, String clusterName, Context context); /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param id the resource ID. @@ -105,12 +119,14 @@ Response listWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource along with {@link Response}. */ ApplicationTypeResource getById(String id); /** - * Get a Service Fabric application type name resource created or in the process of being created in the Service + * Gets a Service Fabric application type name resource. + * + *

Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric cluster resource. * * @param id the resource ID. @@ -119,12 +135,14 @@ Response listWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric application type name resource created or in the process of being created in the Service - * Fabric cluster resource. + * Fabric cluster resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +152,9 @@ Response listWithResponse( void deleteById(String id); /** - * Delete a Service Fabric application type name resource with the specified name. + * Deletes a Service Fabric application type name resource. + * + *

Delete a Service Fabric application type name resource with the specified name. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java index 5b49741e4f50..337249d76fbf 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUpgradePolicy.java @@ -5,30 +5,23 @@ package com.azure.resourcemanager.servicefabric.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; /** Describes the policy for a monitored application upgrade. */ @Fluent public final class ApplicationUpgradePolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationUpgradePolicy.class); - /* - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed - * regardless of availability loss issues. The timeout is reset at the - * start of each upgrade domain. Valid values are between 0 and 42949672925 - * inclusive. (unsigned 32-bit integer). + * The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there + * are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 + * and 42949672925 inclusive. (unsigned 32-bit integer). */ @JsonProperty(value = "upgradeReplicaSetCheckTimeout") private String upgradeReplicaSetCheckTimeout; /* - * If true, then processes are forcefully restarted during upgrade even - * when the code version has not changed (the upgrade only changes - * configuration or data). + * If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). */ @JsonProperty(value = "forceRestart") private Boolean forceRestart; @@ -40,24 +33,22 @@ public final class ApplicationUpgradePolicy { private ArmRollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy; /* - * Defines a health policy used to evaluate the health of an application or - * one of its children entities. + * Defines a health policy used to evaluate the health of an application or one of its children entities. * */ @JsonProperty(value = "applicationHealthPolicy") private ArmApplicationHealthPolicy applicationHealthPolicy; /* - * The mode used to monitor health during a rolling upgrade. The values are - * UnmonitoredAuto, UnmonitoredManual, and Monitored. + * The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. */ @JsonProperty(value = "upgradeMode") private RollingUpgradeMode upgradeMode; /* - * Determines whether the application should be recreated on update. If - * value=true, the rest of the upgrade policy parameters are not allowed - * and it will result in availability loss. + * Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy + * parameters are not allowed and it will result in availability loss. */ @JsonProperty(value = "recreateApplication") private Boolean recreateApplication; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUserAssignedIdentity.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUserAssignedIdentity.java index fe7dddc496e0..7eb3c36be897 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUserAssignedIdentity.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ApplicationUserAssignedIdentity.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 ApplicationUserAssignedIdentity model. */ @Fluent public class ApplicationUserAssignedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationUserAssignedIdentity.class); - /* * The friendly name of user assigned identity. */ @@ -73,16 +70,18 @@ public ApplicationUserAssignedIdentity withPrincipalId(String principalId) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model ApplicationUserAssignedIdentity")); } if (principalId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property principalId in model ApplicationUserAssignedIdentity")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationUserAssignedIdentity.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Applications.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Applications.java index 6cad51a2502c..6d1c1ba97e88 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Applications.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Applications.java @@ -10,7 +10,9 @@ /** Resource collection API of Applications. */ public interface Applications { /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -25,7 +27,9 @@ public interface Applications { ApplicationResource get(String resourceGroupName, String clusterName, String applicationName); /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param resourceGroupName The name of the resource group. @@ -36,13 +40,15 @@ public interface Applications { * @throws com.azure.core.management.exception.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 Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -54,7 +60,9 @@ Response getWithResponse( void delete(String resourceGroupName, String clusterName, String applicationName); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -67,7 +75,10 @@ Response getWithResponse( void delete(String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -80,7 +91,10 @@ Response getWithResponse( ApplicationResourceList list(String resourceGroupName, String clusterName); /** - * Gets all application resources created or in the process of being created in the Service Fabric cluster resource. + * Gets the list of application resources created in the specified Service Fabric cluster resource. + * + *

Gets all application resources created or in the process of being created in the Service Fabric cluster + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -89,12 +103,14 @@ Response getWithResponse( * @throws com.azure.core.management.exception.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 application resources created or in the process of being created in the Service Fabric cluster - * resource. + * resource along with {@link Response}. */ Response listWithResponse(String resourceGroupName, String clusterName, Context context); /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param id the resource ID. @@ -102,12 +118,14 @@ Response getWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ ApplicationResource getById(String id); /** - * Get a Service Fabric application resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric application resource. + * + *

Get a Service Fabric application resource created or in the process of being created in the Service Fabric * cluster resource. * * @param id the resource ID. @@ -116,12 +134,14 @@ Response getWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric application resource created or in the process of being created in the Service Fabric - * cluster resource. + * cluster resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +151,9 @@ Response getWithResponse( void deleteById(String id); /** - * Delete a Service Fabric application resource with the specified name. + * Deletes a Service Fabric application resource. + * + *

Delete a Service Fabric application resource with the specified name. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmApplicationHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmApplicationHealthPolicy.java index cb878690ef80..8624f0b1bec2 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmApplicationHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmApplicationHealthPolicy.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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 @@ /** Defines a health policy used to evaluate the health of an application or one of its children entities. */ @Fluent public final class ArmApplicationHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmApplicationHealthPolicy.class); - /* * Indicates whether warnings are treated with the same severity as errors. */ @@ -23,31 +19,26 @@ public final class ArmApplicationHealthPolicy { private Boolean considerWarningAsError; /* - * The maximum allowed percentage of unhealthy deployed applications. - * Allowed values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed - * applications that can be unhealthy before the application is considered - * in error. - * This is calculated by dividing the number of unhealthy deployed - * applications over the number of nodes where the application is currently - * deployed on in the cluster. - * The computation rounds up to tolerate one failure on small numbers of - * nodes. Default percentage is zero. + * The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to + * 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before + * the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the + * application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. * */ @JsonProperty(value = "maxPercentUnhealthyDeployedApplications") private Integer maxPercentUnhealthyDeployedApplications; /* - * The health policy used by default to evaluate the health of a service - * type. + * The health policy used by default to evaluate the health of a service type. */ @JsonProperty(value = "defaultServiceTypeHealthPolicy") private ArmServiceTypeHealthPolicy defaultServiceTypeHealthPolicy; /* - * The map with service type health policy per service type name. The map - * is empty by default. + * The map with service type health policy per service type name. The map is empty by default. */ @JsonProperty(value = "serviceTypeHealthPolicyMap") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmRollingUpgradeMonitoringPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmRollingUpgradeMonitoringPolicy.java index b49739282eb5..de1d8b6e520d 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmRollingUpgradeMonitoringPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmRollingUpgradeMonitoringPolicy.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.servicefabric.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 policy used for monitoring the application upgrade. */ @Fluent public final class ArmRollingUpgradeMonitoringPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmRollingUpgradeMonitoringPolicy.class); - /* * The activation Mode of the service package */ @@ -21,48 +17,41 @@ public final class ArmRollingUpgradeMonitoringPolicy { private ArmUpgradeFailureAction failureAction; /* - * The amount of time to wait after completing an upgrade domain before - * applying health policies. It is first interpreted as a string - * representing an ISO 8601 duration. If that fails, then it is interpreted - * as a number representing the total number of milliseconds. + * The amount of time to wait after completing an upgrade domain before applying health policies. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. */ @JsonProperty(value = "healthCheckWaitDuration") private String healthCheckWaitDuration; /* - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. It is first - * interpreted as a string representing an ISO 8601 duration. If that - * fails, then it is interpreted as a number representing the total number - * of milliseconds. + * The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next + * upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + * interpreted as a number representing the total number of milliseconds. */ @JsonProperty(value = "healthCheckStableDuration") private String healthCheckStableDuration; /* - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before FailureAction is executed. It is first - * interpreted as a string representing an ISO 8601 duration. If that - * fails, then it is interpreted as a number representing the total number - * of milliseconds. + * The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + * interpreted as a number representing the total number of milliseconds. */ @JsonProperty(value = "healthCheckRetryTimeout") private String healthCheckRetryTimeout; /* - * The amount of time the overall upgrade has to complete before - * FailureAction is executed. It is first interpreted as a string - * representing an ISO 8601 duration. If that fails, then it is interpreted - * as a number representing the total number of milliseconds. + * The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted + * as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing + * the total number of milliseconds. */ @JsonProperty(value = "upgradeTimeout") private String upgradeTimeout; /* - * The amount of time each upgrade domain has to complete before - * FailureAction is executed. It is first interpreted as a string - * representing an ISO 8601 duration. If that fails, then it is interpreted - * as a number representing the total number of milliseconds. + * The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted + * as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing + * the total number of milliseconds. */ @JsonProperty(value = "upgradeDomainTimeout") private String upgradeDomainTimeout; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServicePackageActivationMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServicePackageActivationMode.java index 97f6aa86e934..0de3befa8462 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServicePackageActivationMode.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServicePackageActivationMode.java @@ -27,7 +27,11 @@ public static ArmServicePackageActivationMode fromString(String name) { return fromString(name, ArmServicePackageActivationMode.class); } - /** @return known ArmServicePackageActivationMode values. */ + /** + * Gets known ArmServicePackageActivationMode values. + * + * @return known ArmServicePackageActivationMode values. + */ public static Collection values() { return values(ArmServicePackageActivationMode.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServiceTypeHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServiceTypeHealthPolicy.java index 245889b226a0..1433e3fb3e9d 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServiceTypeHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmServiceTypeHealthPolicy.java @@ -5,34 +5,29 @@ package com.azure.resourcemanager.servicefabric.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; /** Represents the health policy used to evaluate the health of services belonging to a service type. */ @Fluent public final class ArmServiceTypeHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmServiceTypeHealthPolicy.class); - /* - * The maximum percentage of services allowed to be unhealthy before your - * application is considered in error. + * The maximum percentage of services allowed to be unhealthy before your application is considered in error. * */ @JsonProperty(value = "maxPercentUnhealthyServices") private Integer maxPercentUnhealthyServices; /* - * The maximum percentage of partitions per service allowed to be unhealthy - * before your application is considered in error. + * The maximum percentage of partitions per service allowed to be unhealthy before your application is considered + * in error. * */ @JsonProperty(value = "maxPercentUnhealthyPartitionsPerService") private Integer maxPercentUnhealthyPartitionsPerService; /* - * The maximum percentage of replicas per partition allowed to be unhealthy - * before your application is considered in error. + * The maximum percentage of replicas per partition allowed to be unhealthy before your application is considered + * in error. * */ @JsonProperty(value = "maxPercentUnhealthyReplicasPerPartition") diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmUpgradeFailureAction.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmUpgradeFailureAction.java index fd1a80bbd447..ffa9cfa6e6b3 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmUpgradeFailureAction.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ArmUpgradeFailureAction.java @@ -27,7 +27,11 @@ public static ArmUpgradeFailureAction fromString(String name) { return fromString(name, ArmUpgradeFailureAction.class); } - /** @return known ArmUpgradeFailureAction values. */ + /** + * Gets known ArmUpgradeFailureAction values. + * + * @return known ArmUpgradeFailureAction values. + */ public static Collection values() { return values(ArmUpgradeFailureAction.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AvailableOperationDisplay.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AvailableOperationDisplay.java index 919e9e543444..c483a357f2e2 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AvailableOperationDisplay.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AvailableOperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.servicefabric.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; /** Operation supported by the Service Fabric resource provider. */ @Fluent public final class AvailableOperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableOperationDisplay.class); - /* * The name of the provider. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AzureActiveDirectory.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AzureActiveDirectory.java index f304ec493c15..57f424b69bf4 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AzureActiveDirectory.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/AzureActiveDirectory.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.servicefabric.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 settings to enable AAD authentication on the cluster. */ @Fluent public final class AzureActiveDirectory { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureActiveDirectory.class); - /* * Azure active directory tenant id. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/CertificateDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/CertificateDescription.java index 2e827d1bc674..beba66ffe24d 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/CertificateDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/CertificateDescription.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 the certificate details. */ @Fluent public final class CertificateDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateDescription.class); - /* * Thumbprint of the primary certificate. */ @@ -99,10 +96,12 @@ public CertificateDescription withX509StoreName(StoreName x509StoreName) { */ public void validate() { if (thumbprint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property thumbprint in model CertificateDescription")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CertificateDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateCommonName.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateCommonName.java index 161777d2f4f7..9caa4449e607 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateCommonName.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateCommonName.java @@ -6,17 +6,14 @@ 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 the client certificate details using common name. */ @Fluent public final class ClientCertificateCommonName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientCertificateCommonName.class); - /* - * Indicates if the client certificate has admin access to the cluster. Non - * admin clients can perform only read only operations on the cluster. + * Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read + * only operations on the cluster. */ @JsonProperty(value = "isAdmin", required = true) private boolean isAdmin; @@ -102,16 +99,18 @@ public ClientCertificateCommonName withCertificateIssuerThumbprint(String certif */ public void validate() { if (certificateCommonName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property certificateCommonName in model ClientCertificateCommonName")); } if (certificateIssuerThumbprint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property certificateIssuerThumbprint in model ClientCertificateCommonName")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClientCertificateCommonName.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateThumbprint.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateThumbprint.java index 14b21c1d6b6a..37bbb64602a5 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateThumbprint.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClientCertificateThumbprint.java @@ -6,17 +6,14 @@ 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 the client certificate details using thumbprint. */ @Fluent public final class ClientCertificateThumbprint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientCertificateThumbprint.class); - /* - * Indicates if the client certificate has admin access to the cluster. Non - * admin clients can perform only read only operations on the cluster. + * Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read + * only operations on the cluster. */ @JsonProperty(value = "isAdmin", required = true) private boolean isAdmin; @@ -76,10 +73,12 @@ public ClientCertificateThumbprint withCertificateThumbprint(String certificateT */ public void validate() { if (certificateThumbprint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property certificateThumbprint in model ClientCertificateThumbprint")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClientCertificateThumbprint.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java index d7f8af757635..7557cff9f0d1 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Cluster.java @@ -343,6 +343,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.servicefabric.fluent.models.ClusterInner object. * @@ -1120,7 +1127,10 @@ interface WithNotifications { Cluster refresh(Context context); /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1131,7 +1141,10 @@ interface WithNotifications { UpgradableVersionPathResult listUpgradableVersions(); /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -1140,7 +1153,7 @@ interface WithNotifications { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade along with {@link Response}. */ Response listUpgradableVersionsWithResponse( UpgradableVersionsDescription versionsDescription, Context context); diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java index 19efb2f4e228..9487d8b91b12 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterCodeVersionsResult.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.servicefabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.fluent.models.ClusterVersionDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The result of the Service Fabric runtime versions. */ @Fluent public final class ClusterCodeVersionsResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterCodeVersionsResult.class); - /* * The identification of the result */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterEnvironment.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterEnvironment.java index b18482217aa0..24efe8c2ea26 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterEnvironment.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterEnvironment.java @@ -27,7 +27,11 @@ public static ClusterEnvironment fromString(String name) { return fromString(name, ClusterEnvironment.class); } - /** @return known ClusterEnvironment values. */ + /** + * Gets known ClusterEnvironment values. + * + * @return known ClusterEnvironment values. + */ public static Collection values() { return values(ClusterEnvironment.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterHealthPolicy.java index de18f2148c39..a2b2f20d2adc 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterHealthPolicy.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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,53 +12,44 @@ /** Defines a health policy used to evaluate the health of the cluster or of a cluster node. */ @Fluent public final class ClusterHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterHealthPolicy.class); - /* - * The maximum allowed percentage of unhealthy nodes before reporting an - * error. For example, to allow 10% of nodes to be unhealthy, this value - * would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that - * can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, - * the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes - * over the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of - * nodes. Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. + * The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes + * to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is + * considered in error. + * If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the + * cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + * + * In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to + * tolerate that. * */ @JsonProperty(value = "maxPercentUnhealthyNodes") private Integer maxPercentUnhealthyNodes; /* - * The maximum allowed percentage of unhealthy applications before - * reporting an error. For example, to allow 10% of applications to be - * unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of - * applications that can be unhealthy before the cluster is considered in - * error. - * If the percentage is respected but there is at least one unhealthy - * application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over - * the total number of application instances in the cluster, excluding - * applications of application types that are included in the + * The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of + * applications to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the + * cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy application, the health is evaluated as + * Warning. + * This is calculated by dividing the number of unhealthy applications over the total number of application + * instances in the cluster, excluding applications of application types that are included in the * ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of - * applications. Default percentage is zero. + * The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. * */ @JsonProperty(value = "maxPercentUnhealthyApplications") private Integer maxPercentUnhealthyApplications; /* - * Defines the application health policy map used to evaluate the health of - * an application or one of its children entities. + * Defines the application health policy map used to evaluate the health of an application or one of its children + * entities. */ @JsonProperty(value = "applicationHealthPolicies") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterState.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterState.java index 22ab39345896..1bdd4535df45 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterState.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterState.java @@ -51,7 +51,11 @@ public static ClusterState fromString(String name) { return fromString(name, ClusterState.class); } - /** @return known ClusterState values. */ + /** + * Gets known ClusterState values. + * + * @return known ClusterState values. + */ public static Collection values() { return values(ClusterState.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java index af174c4c9d2e..ab78b179c9d1 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpdateParameters.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.servicefabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.fluent.models.ClusterPropertiesUpdateParameters; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -17,11 +15,8 @@ /** Cluster update request. */ @Fluent public final class ClusterUpdateParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterUpdateParameters.class); - /* - * Describes the cluster resource properties that can be updated during - * PATCH operation. + * Describes the cluster resource properties that can be updated during PATCH operation. */ @JsonProperty(value = "properties") private ClusterPropertiesUpdateParameters innerProperties; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeCadence.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeCadence.java index e74aa60f83a8..d06f70c60e68 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeCadence.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeCadence.java @@ -30,7 +30,11 @@ public static ClusterUpgradeCadence fromString(String name) { return fromString(name, ClusterUpgradeCadence.class); } - /** @return known ClusterUpgradeCadence values. */ + /** + * Gets known ClusterUpgradeCadence values. + * + * @return known ClusterUpgradeCadence values. + */ public static Collection values() { return values(ClusterUpgradeCadence.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeDeltaHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeDeltaHealthPolicy.java index 1a6f5d9be7c4..0fd14257c474 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeDeltaHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradeDeltaHealthPolicy.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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,52 +12,42 @@ /** Describes the delta health policies for the cluster upgrade. */ @Fluent public final class ClusterUpgradeDeltaHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterUpgradeDeltaHealthPolicy.class); - /* - * The maximum allowed percentage of nodes health degradation allowed - * during cluster upgrades. - * The delta is measured between the state of the nodes at the beginning of - * upgrade and the state of the nodes at the time of the health evaluation. - * The check is performed after every upgrade domain upgrade completion to - * make sure the global state of the cluster is within tolerated limits. + * The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. + * The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at + * the time of the health evaluation. + * The check is performed after every upgrade domain upgrade completion to make sure the global state of the + * cluster is within tolerated limits. * */ @JsonProperty(value = "maxPercentDeltaUnhealthyNodes", required = true) private int maxPercentDeltaUnhealthyNodes; /* - * The maximum allowed percentage of upgrade domain nodes health - * degradation allowed during cluster upgrades. - * The delta is measured between the state of the upgrade domain nodes at - * the beginning of upgrade and the state of the upgrade domain nodes at - * the time of the health evaluation. - * The check is performed after every upgrade domain upgrade completion for - * all completed upgrade domains to make sure the state of the upgrade - * domains is within tolerated limits. + * The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. + * The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of + * the upgrade domain nodes at the time of the health evaluation. + * The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make + * sure the state of the upgrade domains is within tolerated limits. * */ @JsonProperty(value = "maxPercentUpgradeDomainDeltaUnhealthyNodes", required = true) private int maxPercentUpgradeDomainDeltaUnhealthyNodes; /* - * The maximum allowed percentage of applications health degradation - * allowed during cluster upgrades. - * The delta is measured between the state of the applications at the - * beginning of upgrade and the state of the applications at the time of - * the health evaluation. - * The check is performed after every upgrade domain upgrade completion to - * make sure the global state of the cluster is within tolerated limits. - * System services are not included in this. + * The maximum allowed percentage of applications health degradation allowed during cluster upgrades. + * The delta is measured between the state of the applications at the beginning of upgrade and the state of the + * applications at the time of the health evaluation. + * The check is performed after every upgrade domain upgrade completion to make sure the global state of the + * cluster is within tolerated limits. System services are not included in this. * */ @JsonProperty(value = "maxPercentDeltaUnhealthyApplications", required = true) private int maxPercentDeltaUnhealthyApplications; /* - * Defines the application delta health policy map used to evaluate the - * health of an application or one of its child entities when upgrading the - * cluster. + * Defines the application delta health policy map used to evaluate the health of an application or one of its + * child entities when upgrading the cluster. */ @JsonProperty(value = "applicationDeltaHealthPolicies") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradePolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradePolicy.java index ac07b13f3158..25c909b89e69 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradePolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterUpgradePolicy.java @@ -6,69 +6,58 @@ 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 the policy used when upgrading the cluster. */ @Fluent public final class ClusterUpgradePolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterUpgradePolicy.class); - /* - * If true, then processes are forcefully restarted during upgrade even - * when the code version has not changed (the upgrade only changes - * configuration or data). + * If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). */ @JsonProperty(value = "forceRestart") private Boolean forceRestart; /* - * The maximum amount of time to block processing of an upgrade domain and - * prevent loss of availability when there are unexpected issues. When this - * timeout expires, processing of the upgrade domain will proceed - * regardless of availability loss issues. The timeout is reset at the - * start of each upgrade domain. The timeout can be in either hh:mm:ss or - * in d.hh:mm:ss.ms format. + * The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there + * are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade domain. The timeout can be in either + * hh:mm:ss or in d.hh:mm:ss.ms format. */ @JsonProperty(value = "upgradeReplicaSetCheckTimeout", required = true) private String upgradeReplicaSetCheckTimeout; /* - * The length of time to wait after completing an upgrade domain before - * performing health checks. The duration can be in either hh:mm:ss or in - * d.hh:mm:ss.ms format. + * The length of time to wait after completing an upgrade domain before performing health checks. The duration can + * be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ @JsonProperty(value = "healthCheckWaitDuration", required = true) private String healthCheckWaitDuration; /* - * The amount of time that the application or cluster must remain healthy - * before the upgrade proceeds to the next upgrade domain. The duration can - * be in either hh:mm:ss or in d.hh:mm:ss.ms format. + * The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next + * upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ @JsonProperty(value = "healthCheckStableDuration", required = true) private String healthCheckStableDuration; /* - * The amount of time to retry health evaluation when the application or - * cluster is unhealthy before the upgrade rolls back. The timeout can be - * in either hh:mm:ss or in d.hh:mm:ss.ms format. + * The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade + * rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ @JsonProperty(value = "healthCheckRetryTimeout", required = true) private String healthCheckRetryTimeout; /* - * The amount of time the overall upgrade has to complete before the - * upgrade rolls back. The timeout can be in either hh:mm:ss or in - * d.hh:mm:ss.ms format. + * The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in + * either hh:mm:ss or in d.hh:mm:ss.ms format. */ @JsonProperty(value = "upgradeTimeout", required = true) private String upgradeTimeout; /* - * The amount of time each upgrade domain has to complete before the - * upgrade rolls back. The timeout can be in either hh:mm:ss or in - * d.hh:mm:ss.ms format. + * The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in + * either hh:mm:ss or in d.hh:mm:ss.ms format. */ @JsonProperty(value = "upgradeDomainTimeout", required = true) private String upgradeDomainTimeout; @@ -294,43 +283,43 @@ public ClusterUpgradePolicy withDeltaHealthPolicy(ClusterUpgradeDeltaHealthPolic */ public void validate() { if (upgradeReplicaSetCheckTimeout() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property upgradeReplicaSetCheckTimeout in model ClusterUpgradePolicy")); } if (healthCheckWaitDuration() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property healthCheckWaitDuration in model ClusterUpgradePolicy")); } if (healthCheckStableDuration() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property healthCheckStableDuration in model ClusterUpgradePolicy")); } if (healthCheckRetryTimeout() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property healthCheckRetryTimeout in model ClusterUpgradePolicy")); } if (upgradeTimeout() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property upgradeTimeout in model ClusterUpgradePolicy")); } if (upgradeDomainTimeout() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property upgradeDomainTimeout in model ClusterUpgradePolicy")); } if (healthPolicy() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property healthPolicy in model ClusterUpgradePolicy")); @@ -341,4 +330,6 @@ public void validate() { deltaHealthPolicy().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgradePolicy.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersions.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersions.java index c3c488dd0a38..cb0f63aa1488 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersions.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersions.java @@ -10,7 +10,9 @@ /** Resource collection API of ClusterVersions. */ public interface ClusterVersions { /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. @@ -22,7 +24,9 @@ public interface ClusterVersions { ClusterCodeVersionsListResult get(String location, String clusterVersion); /** - * Gets information about an available Service Fabric cluster code version. + * Gets information about a Service Fabric cluster code version available in the specified location. + * + *

Gets information about an available Service Fabric cluster code version. * * @param location The location for the cluster code versions. This is different from cluster location. * @param clusterVersion The cluster code version. @@ -30,12 +34,14 @@ public interface ClusterVersions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version. + * @return information about an available Service Fabric cluster code version along with {@link Response}. */ Response getWithResponse(String location, String clusterVersion, Context context); /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -49,7 +55,9 @@ ClusterCodeVersionsListResult getByEnvironment( String location, ClusterVersionsEnvironment environment, String clusterVersion); /** - * Gets information about an available Service Fabric cluster code version by environment. + * Gets information about a Service Fabric cluster code version available for the specified environment. + * + *

Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -58,13 +66,16 @@ ClusterCodeVersionsListResult getByEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment. + * @return information about an available Service Fabric cluster code version by environment along with {@link + * Response}. */ Response getByEnvironmentWithResponse( String location, ClusterVersionsEnvironment environment, String clusterVersion, Context context); /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -75,19 +86,23 @@ Response getByEnvironmentWithResponse( ClusterCodeVersionsListResult list(String location); /** - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets the list of Service Fabric cluster code versions available for the specified location. + * + *

Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. * @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 available code versions for Service Fabric cluster resources by location. + * @return all available code versions for Service Fabric cluster resources by location along with {@link Response}. */ Response listWithResponse(String location, Context context); /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -99,7 +114,9 @@ Response getByEnvironmentWithResponse( ClusterCodeVersionsListResult listByEnvironment(String location, ClusterVersionsEnvironment environment); /** - * Gets all available code versions for Service Fabric cluster resources by environment. + * Gets the list of Service Fabric cluster code versions available for the specified environment. + * + *

Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. * @param environment The operating system of the cluster. The default means all. @@ -107,7 +124,8 @@ Response getByEnvironmentWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 available code versions for Service Fabric cluster resources by environment. + * @return all available code versions for Service Fabric cluster resources by environment along with {@link + * Response}. */ Response listByEnvironmentWithResponse( String location, ClusterVersionsEnvironment environment, Context context); diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersionsEnvironment.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersionsEnvironment.java index 02ef82b64f78..784188f1897b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersionsEnvironment.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ClusterVersionsEnvironment.java @@ -27,7 +27,11 @@ public static ClusterVersionsEnvironment fromString(String name) { return fromString(name, ClusterVersionsEnvironment.class); } - /** @return known ClusterVersionsEnvironment values. */ + /** + * Gets known ClusterVersionsEnvironment values. + * + * @return known ClusterVersionsEnvironment values. + */ public static Collection values() { return values(ClusterVersionsEnvironment.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java index 58f7b87f76cb..37eaa443505b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Clusters.java @@ -10,7 +10,10 @@ /** Resource collection API of Clusters. */ public interface Clusters { /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -23,7 +26,10 @@ public interface Clusters { Cluster getByResourceGroup(String resourceGroupName, String clusterName); /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -32,12 +38,14 @@ public interface Clusters { * @throws com.azure.core.management.exception.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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -48,7 +56,9 @@ public interface Clusters { void deleteByResourceGroup(String resourceGroupName, String clusterName); /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -56,12 +66,14 @@ 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 response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String clusterName, Context context); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,19 +84,24 @@ public interface Clusters { ClusterListResult listByResourceGroup(String resourceGroupName); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. + * Gets the list of Service Fabric cluster resources created in the specified resource group. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @param resourceGroupName The name of the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the resource group. + * @return all Service Fabric cluster resources created or in the process of being created in the resource group + * along with {@link Response}. */ Response listByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -93,18 +110,24 @@ public interface Clusters { ClusterListResult list(); /** - * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + * Gets the list of Service Fabric cluster resources created in the specified subscription. + * + *

Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Service Fabric cluster resources created or in the process of being created in the subscription. + * @return all Service Fabric cluster resources created or in the process of being created in the subscription along + * with {@link Response}. */ Response listWithResponse(Context context); /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -118,7 +141,10 @@ public interface Clusters { UpgradableVersionPathResult listUpgradableVersions(String resourceGroupName, String clusterName); /** - * If a target is not provided, it will get the minimum and maximum versions available from the current cluster + * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required + * path to get to the an specific target version. + * + *

If a target is not provided, it will get the minimum and maximum versions available from the current cluster * version. If a target is given, it will provide the required path to get from the current cluster version to the * target version. * @@ -129,7 +155,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 of intermediate cluster code versions for an upgrade or downgrade. + * @return the list of intermediate cluster code versions for an upgrade or downgrade along with {@link Response}. */ Response listUpgradableVersionsWithResponse( String resourceGroupName, @@ -138,19 +164,25 @@ Response listUpgradableVersionsWithResponse( Context context); /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group along with {@link Response}. */ Cluster getById(String id); /** - * Get a Service Fabric cluster resource created or in the process of being created in the specified resource group. + * Gets a Service Fabric cluster resource. + * + *

Get a Service Fabric cluster resource created or in the process of being created in the specified resource + * group. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -158,12 +190,14 @@ Response listUpgradableVersionsWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric cluster resource created or in the process of being created in the specified resource - * group. + * group along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,14 +207,16 @@ Response listUpgradableVersionsWithResponse( void deleteById(String id); /** - * Delete a Service Fabric cluster resource with the specified name. + * Deletes a Service Fabric cluster resource. + * + *

Delete a Service Fabric cluster resource with the specified name. * * @param id the resource 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. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.java index 74761b8526a0..426a55ce2a78 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DiagnosticsStorageAccountConfig.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 storage account information for storing Service Fabric diagnostic logs. */ @Fluent public final class DiagnosticsStorageAccountConfig { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticsStorageAccountConfig.class); - /* * The Azure storage account name. */ @@ -27,9 +24,8 @@ public final class DiagnosticsStorageAccountConfig { private String protectedAccountKeyName; /* - * The secondary protected diagnostics storage key name. If one of the - * storage account keys is rotated the cluster will fallback to using the - * other. + * The secondary protected diagnostics storage key name. If one of the storage account keys is rotated the cluster + * will fallback to using the other. */ @JsonProperty(value = "protectedAccountKeyName2") private String protectedAccountKeyName2; @@ -181,34 +177,36 @@ public DiagnosticsStorageAccountConfig withTableEndpoint(String tableEndpoint) { */ public void validate() { if (storageAccountName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property storageAccountName in model DiagnosticsStorageAccountConfig")); } if (protectedAccountKeyName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property protectedAccountKeyName in model DiagnosticsStorageAccountConfig")); } if (blobEndpoint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property blobEndpoint in model DiagnosticsStorageAccountConfig")); } if (queueEndpoint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property queueEndpoint in model DiagnosticsStorageAccountConfig")); } if (tableEndpoint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property tableEndpoint in model DiagnosticsStorageAccountConfig")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsStorageAccountConfig.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DurabilityLevel.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DurabilityLevel.java index 2d693281eda9..aeffc4d40f1b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DurabilityLevel.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/DurabilityLevel.java @@ -30,7 +30,11 @@ public static DurabilityLevel fromString(String name) { return fromString(name, DurabilityLevel.class); } - /** @return known DurabilityLevel values. */ + /** + * Gets known DurabilityLevel values. + * + * @return known DurabilityLevel values. + */ public static Collection values() { return values(DurabilityLevel.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/EndpointRangeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/EndpointRangeDescription.java index 7a9e7832d941..e6f220c19212 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/EndpointRangeDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/EndpointRangeDescription.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.servicefabric.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; /** Port range details. */ @Fluent public final class EndpointRangeDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointRangeDescription.class); - /* * Starting port of a range of ports */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentity.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentity.java index 679a0eb80655..104150e966cf 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentity.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentity.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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,18 +12,14 @@ /** Describes the managed identities for an Azure resource. */ @Fluent public class ManagedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentity.class); - /* - * The principal id of the managed identity. This property will only be - * provided for a system assigned identity. + * The principal id of the managed 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 of the managed identity. This property will only be - * provided for a system assigned identity. + * The tenant id of the managed identity. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; @@ -37,8 +31,8 @@ public class ManagedIdentity { private ManagedIdentityType type; /* - * The list of user identities associated with the resource. The user - * identity dictionary key references will be ARM resource ids in the form: + * The list of user identities associated with the resource. The user identity dictionary key references will be + * ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentityType.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentityType.java index 4e259f7a33df..7e9fd1cf5a9f 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentityType.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ManagedIdentityType.java @@ -36,6 +36,9 @@ public enum ManagedIdentityType { */ @JsonCreator public static ManagedIdentityType fromString(String value) { + if (value == null) { + return null; + } ManagedIdentityType[] items = ManagedIdentityType.values(); for (ManagedIdentityType item : items) { if (item.toString().equalsIgnoreCase(value)) { diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/MoveCost.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/MoveCost.java index 2f70638346aa..a888ed78b26e 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/MoveCost.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/MoveCost.java @@ -33,7 +33,11 @@ public static MoveCost fromString(String name) { return fromString(name, MoveCost.class); } - /** @return known MoveCost values. */ + /** + * Gets known MoveCost values. + * + * @return known MoveCost values. + */ public static Collection values() { return values(MoveCost.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java index e714831b55d7..fbf5eb0f7ec1 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NamedPartitionSchemeDescription.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("Named") @Fluent public final class NamedPartitionSchemeDescription extends PartitionSchemeDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NamedPartitionSchemeDescription.class); - /* * The number of partitions. */ @@ -26,8 +23,7 @@ public final class NamedPartitionSchemeDescription extends PartitionSchemeDescri private int count; /* - * Array of size specified by the ‘count’ parameter, for the names of the - * partitions. + * Array of size specified by the ‘count’ parameter, for the names of the partitions. */ @JsonProperty(value = "names", required = true) private List names; @@ -81,10 +77,12 @@ public NamedPartitionSchemeDescription withNames(List names) { public void validate() { super.validate(); if (names() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property names in model NamedPartitionSchemeDescription")); } } + + private static final ClientLogger LOGGER = new ClientLogger(NamedPartitionSchemeDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java index 8293b98d643f..02d8ba5f66f7 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NodeTypeDescription.java @@ -6,7 +6,6 @@ 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 +13,6 @@ /** Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ @Fluent public final class NodeTypeDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NodeTypeDescription.class); - /* * The name of the node type. */ @@ -23,17 +20,16 @@ public final class NodeTypeDescription { private String name; /* - * The placement tags applied to nodes in the node type, which can be used - * to indicate where certain services (workload) should run. + * The placement tags applied to nodes in the node type, which can be used to indicate where certain services + * (workload) should run. */ @JsonProperty(value = "placementProperties") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map placementProperties; /* - * The capacity tags applied to the nodes in the node type, the cluster - * resource manager uses these tags to understand how much resource a node - * has. + * The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to + * understand how much resource a node has. */ @JsonProperty(value = "capacities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -56,46 +52,38 @@ public final class NodeTypeDescription { * [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). * * - Bronze - No privileges. This is the default. - * - Silver - The infrastructure jobs can be paused for a duration of 10 - * minutes per UD. - * - Gold - The infrastructure jobs can be paused for a duration of 2 hours - * per UD. Gold durability can be enabled only on full node VM skus like - * D15_V2, G5 etc. + * - Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. + * - Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled + * only on full node VM skus like D15_V2, G5 etc. * */ @JsonProperty(value = "durabilityLevel") private DurabilityLevel durabilityLevel; /* - * The range of ports from which cluster assigned port to Service Fabric - * applications. + * The range of ports from which cluster assigned port to Service Fabric applications. */ @JsonProperty(value = "applicationPorts") private EndpointRangeDescription applicationPorts; /* - * The range of ephemeral ports that nodes in this node type should be - * configured with. + * The range of ephemeral ports that nodes in this node type should be configured with. */ @JsonProperty(value = "ephemeralPorts") private EndpointRangeDescription ephemeralPorts; /* - * The node type on which system services will run. Only one node type - * should be marked as primary. Primary node type cannot be deleted or - * changed for existing clusters. + * The node type on which system services will run. Only one node type should be marked as primary. Primary node + * type cannot be deleted or changed for existing clusters. */ @JsonProperty(value = "isPrimary", required = true) private boolean isPrimary; /* - * VMInstanceCount should be 1 to n, where n indicates the number of VM - * instances corresponding to this nodeType. VMInstanceCount = 0 can be - * done only in these scenarios: NodeType is a secondary nodeType. - * Durability = Bronze or Durability >= Bronze and - * InfrastructureServiceManager = true. If VMInstanceCount = 0, implies the - * VMs for this nodeType will not be used for the initial cluster size - * computation. + * VMInstanceCount should be 1 to n, where n indicates the number of VM instances corresponding to this nodeType. + * VMInstanceCount = 0 can be done only in these scenarios: NodeType is a secondary nodeType. Durability = Bronze + * or Durability >= Bronze and InfrastructureServiceManager = true. If VMInstanceCount = 0, implies the VMs for + * this nodeType will not be used for the initial cluster size computation. */ @JsonProperty(value = "vmInstanceCount", required = true) private int vmInstanceCount; @@ -411,7 +399,7 @@ public NodeTypeDescription withMultipleAvailabilityZones(Boolean multipleAvailab */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model NodeTypeDescription")); } @@ -422,4 +410,6 @@ public void validate() { ephemeralPorts().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(NodeTypeDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Notification.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Notification.java index 3eb5bcca6af1..5bfd33a7bc23 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Notification.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Notification.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 the notification channel for cluster events. */ @Fluent public final class Notification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Notification.class); - /* * Indicates if the notification is enabled. */ @@ -126,18 +123,18 @@ public Notification withNotificationTargets(List notificatio */ public void validate() { if (notificationCategory() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property notificationCategory in model Notification")); } if (notificationLevel() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property notificationLevel in model Notification")); } if (notificationTargets() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property notificationTargets in model Notification")); @@ -145,4 +142,6 @@ public void validate() { notificationTargets().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(Notification.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationCategory.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationCategory.java index 9bf373a37deb..8260dcfc5006 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationCategory.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationCategory.java @@ -24,7 +24,11 @@ public static NotificationCategory fromString(String name) { return fromString(name, NotificationCategory.class); } - /** @return known NotificationCategory values. */ + /** + * Gets known NotificationCategory values. + * + * @return known NotificationCategory values. + */ public static Collection values() { return values(NotificationCategory.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationChannel.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationChannel.java index ab01032ba4f7..09851fd3ebce 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationChannel.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationChannel.java @@ -27,7 +27,11 @@ public static NotificationChannel fromString(String name) { return fromString(name, NotificationChannel.class); } - /** @return known NotificationChannel values. */ + /** + * Gets known NotificationChannel values. + * + * @return known NotificationChannel values. + */ public static Collection values() { return values(NotificationChannel.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationLevel.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationLevel.java index 572f9df60d34..8ff5aff30062 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationLevel.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationLevel.java @@ -27,7 +27,11 @@ public static NotificationLevel fromString(String name) { return fromString(name, NotificationLevel.class); } - /** @return known NotificationLevel values. */ + /** + * Gets known NotificationLevel values. + * + * @return known NotificationLevel values. + */ public static Collection values() { return values(NotificationLevel.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationTarget.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationTarget.java index 99cd5840f317..1d4816e30170 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationTarget.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/NotificationTarget.java @@ -6,18 +6,15 @@ 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 notification target properties. */ @Fluent public final class NotificationTarget { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationTarget.class); - /* - * The notification channel indicates the type of receivers subscribed to - * the notification, either user or subscription. + * The notification channel indicates the type of receivers subscribed to the notification, either user or + * subscription. */ @JsonProperty(value = "notificationChannel", required = true) private NotificationChannel notificationChannel; @@ -77,15 +74,17 @@ public NotificationTarget withReceivers(List receivers) { */ public void validate() { if (notificationChannel() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property notificationChannel in model NotificationTarget")); } if (receivers() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property receivers in model NotificationTarget")); } } + + private static final ClientLogger LOGGER = new ClientLogger(NotificationTarget.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationListResult.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationListResult.java index 0a0ac52e5426..e8e6ec4d10ac 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationListResult.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/OperationListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.servicefabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.fluent.models.OperationResultInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes the result of the request to list Service Fabric resource provider operations. */ @Fluent public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * List of operations supported by the Service Fabric resource provider. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Operations.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Operations.java index 4dce7b8aed47..a4d6e6bd44f6 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Operations.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Operations.java @@ -10,22 +10,28 @@ /** Resource collection API of Operations. */ public interface Operations { /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API 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 the list of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); /** - * Get the list of available Service Fabric resource provider API operations. + * Lists all of the available Service Fabric resource provider API operations. + * + *

Get the list of available Service Fabric resource provider API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available Service Fabric resource provider API operations. + * @return the list of available Service Fabric resource provider API operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionScheme.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionScheme.java index b1f831533af8..ac2d5d9dcf12 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionScheme.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionScheme.java @@ -33,7 +33,11 @@ public static PartitionScheme fromString(String name) { return fromString(name, PartitionScheme.class); } - /** @return known PartitionScheme values. */ + /** + * Gets known PartitionScheme values. + * + * @return known PartitionScheme values. + */ public static Collection values() { return values(PartitionScheme.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionSchemeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionSchemeDescription.java index d1e3460171ab..b2fa58ef3100 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionSchemeDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/PartitionSchemeDescription.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -25,8 +23,6 @@ }) @Immutable public class PartitionSchemeDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PartitionSchemeDescription.class); - /** * Validates the instance. * diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ProvisioningState.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ProvisioningState.java index 8864ca6263c7..e5d368c8ca67 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ProvisioningState.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ProvisioningState.java @@ -33,7 +33,11 @@ public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } - /** @return known ProvisioningState values. */ + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ public static Collection values() { return values(ProvisioningState.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ReliabilityLevel.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ReliabilityLevel.java index 1e5b9831cc9c..1cf218e4af5c 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ReliabilityLevel.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ReliabilityLevel.java @@ -36,7 +36,11 @@ public static ReliabilityLevel fromString(String name) { return fromString(name, ReliabilityLevel.class); } - /** @return known ReliabilityLevel values. */ + /** + * Gets known ReliabilityLevel values. + * + * @return known ReliabilityLevel values. + */ public static Collection values() { return values(ReliabilityLevel.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/RollingUpgradeMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/RollingUpgradeMode.java index c45522f90277..e5301e103cf1 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/RollingUpgradeMode.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/RollingUpgradeMode.java @@ -33,7 +33,11 @@ public static RollingUpgradeMode fromString(String name) { return fromString(name, RollingUpgradeMode.class); } - /** @return known RollingUpgradeMode values. */ + /** + * Gets known RollingUpgradeMode values. + * + * @return known RollingUpgradeMode values. + */ public static Collection values() { return values(RollingUpgradeMode.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonName.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonName.java index dadba0b58db4..974b62733ab3 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonName.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonName.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 the server certificate details using common name. */ @Fluent public final class ServerCertificateCommonName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerCertificateCommonName.class); - /* * The common name of the server certificate. */ @@ -73,16 +70,18 @@ public ServerCertificateCommonName withCertificateIssuerThumbprint(String certif */ public void validate() { if (certificateCommonName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property certificateCommonName in model ServerCertificateCommonName")); } if (certificateIssuerThumbprint() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property certificateIssuerThumbprint in model ServerCertificateCommonName")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServerCertificateCommonName.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonNames.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonNames.java index a7ce8a5fa90e..210318831523 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonNames.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServerCertificateCommonNames.java @@ -5,19 +5,14 @@ package com.azure.resourcemanager.servicefabric.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 list of server certificates referenced by common name that are used to secure the cluster. */ @Fluent public final class ServerCertificateCommonNames { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerCertificateCommonNames.class); - /* - * The list of server certificates referenced by common name that are used - * to secure the cluster. + * The list of server certificates referenced by common name that are used to secure the cluster. */ @JsonProperty(value = "commonNames") private List commonNames; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationDescription.java index 866712205787..de32bc499a94 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationDescription.java @@ -6,24 +6,20 @@ 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; /** Creates a particular correlation between services. */ @Fluent public final class ServiceCorrelationDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceCorrelationDescription.class); - /* - * The ServiceCorrelationScheme which describes the relationship between - * this service and the service specified via ServiceName. + * The ServiceCorrelationScheme which describes the relationship between this service and the service specified via + * ServiceName. */ @JsonProperty(value = "scheme", required = true) private ServiceCorrelationScheme scheme; /* - * The name of the service that the correlation relationship is established - * with. + * The name of the service that the correlation relationship is established with. */ @JsonProperty(value = "serviceName", required = true) private String serviceName; @@ -77,16 +73,18 @@ public ServiceCorrelationDescription withServiceName(String serviceName) { */ public void validate() { if (scheme() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property scheme in model ServiceCorrelationDescription")); } if (serviceName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property serviceName in model ServiceCorrelationDescription")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceCorrelationDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationScheme.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationScheme.java index 5621f306cd61..9aafb1cd6831 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationScheme.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceCorrelationScheme.java @@ -33,7 +33,11 @@ public static ServiceCorrelationScheme fromString(String name) { return fromString(name, ServiceCorrelationScheme.class); } - /** @return known ServiceCorrelationScheme values. */ + /** + * Gets known ServiceCorrelationScheme values. + * + * @return known ServiceCorrelationScheme values. + */ public static Collection values() { return values(ServiceCorrelationScheme.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceKind.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceKind.java index a016a5f17895..188cce84eb5d 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceKind.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceKind.java @@ -30,7 +30,11 @@ public static ServiceKind fromString(String name) { return fromString(name, ServiceKind.class); } - /** @return known ServiceKind values. */ + /** + * Gets known ServiceKind values. + * + * @return known ServiceKind values. + */ public static Collection values() { return values(ServiceKind.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricDescription.java index e8b0943b16ef..66673984c9a3 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricDescription.java @@ -6,48 +6,41 @@ 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; /** Specifies a metric to load balance a service during runtime. */ @Fluent public final class ServiceLoadMetricDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceLoadMetricDescription.class); - /* - * The name of the metric. If the service chooses to report load during - * runtime, the load metric name should match the name that is specified in - * Name exactly. Note that metric names are case sensitive. + * The name of the metric. If the service chooses to report load during runtime, the load metric name should match + * the name that is specified in Name exactly. Note that metric names are case sensitive. */ @JsonProperty(value = "name", required = true) private String name; /* - * The service load metric relative weight, compared to other metrics - * configured for this service, as a number. + * The service load metric relative weight, compared to other metrics configured for this service, as a number. */ @JsonProperty(value = "weight") private ServiceLoadMetricWeight weight; /* - * Used only for Stateful services. The default amount of load, as a - * number, that this service creates for this metric when it is a Primary - * replica. + * Used only for Stateful services. The default amount of load, as a number, that this service creates for this + * metric when it is a Primary replica. */ @JsonProperty(value = "primaryDefaultLoad") private Integer primaryDefaultLoad; /* - * Used only for Stateful services. The default amount of load, as a - * number, that this service creates for this metric when it is a Secondary - * replica. + * Used only for Stateful services. The default amount of load, as a number, that this service creates for this + * metric when it is a Secondary replica. */ @JsonProperty(value = "secondaryDefaultLoad") private Integer secondaryDefaultLoad; /* - * Used only for Stateless services. The default amount of load, as a - * number, that this service creates for this metric. + * Used only for Stateless services. The default amount of load, as a number, that this service creates for this + * metric. */ @JsonProperty(value = "defaultLoad") private Integer defaultLoad; @@ -169,10 +162,12 @@ public ServiceLoadMetricDescription withDefaultLoad(Integer defaultLoad) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model ServiceLoadMetricDescription")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceLoadMetricDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricWeight.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricWeight.java index bfcd1587a2bc..0579888720d6 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricWeight.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceLoadMetricWeight.java @@ -33,7 +33,11 @@ public static ServiceLoadMetricWeight fromString(String name) { return fromString(name, ServiceLoadMetricWeight.class); } - /** @return known ServiceLoadMetricWeight values. */ + /** + * Gets known ServiceLoadMetricWeight values. + * + * @return known ServiceLoadMetricWeight values. + */ public static Collection values() { return values(ServiceLoadMetricWeight.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java index fa522f32f55e..247f813887a1 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyDescription.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,8 +13,6 @@ @JsonTypeName("ServicePlacementPolicyDescription") @Immutable public final class ServicePlacementPolicyDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicePlacementPolicyDescription.class); - /** * Validates the instance. * diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyType.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyType.java index e996d965fde0..cf0fea13fd57 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyType.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServicePlacementPolicyType.java @@ -40,7 +40,11 @@ public static ServicePlacementPolicyType fromString(String name) { return fromString(name, ServicePlacementPolicyType.class); } - /** @return known ServicePlacementPolicyType values. */ + /** + * Gets known ServicePlacementPolicyType values. + * + * @return known ServicePlacementPolicyType values. + */ public static Collection values() { return values(ServicePlacementPolicyType.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java index 2e1276b4b9ab..6aeb1828d0ed 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResource.java @@ -153,6 +153,13 @@ public interface ServiceResource { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceInner object. * diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourcePropertiesBase.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourcePropertiesBase.java index af8a802a8b8d..fb1ad72626e1 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourcePropertiesBase.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourcePropertiesBase.java @@ -5,43 +5,34 @@ package com.azure.resourcemanager.servicefabric.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 common service resource properties. */ @Fluent public class ServiceResourcePropertiesBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourcePropertiesBase.class); - /* - * The placement constraints as a string. Placement constraints are boolean - * expressions on node properties and allow for restricting a service to - * particular nodes based on the service requirements. For example, to - * place a service on nodes where NodeType is blue specify the following: - * "NodeColor == blue)". + * The placement constraints as a string. Placement constraints are boolean expressions on node properties and + * allow for restricting a service to particular nodes based on the service requirements. For example, to place a + * service on nodes where NodeType is blue specify the following: "NodeColor == blue)". */ @JsonProperty(value = "placementConstraints") private String placementConstraints; /* - * A list that describes the correlation of the service with other - * services. + * A list that describes the correlation of the service with other services. */ @JsonProperty(value = "correlationScheme") private List correlationScheme; /* - * The service load metrics is given as an array of - * ServiceLoadMetricDescription objects. + * The service load metrics is given as an array of ServiceLoadMetricDescription objects. */ @JsonProperty(value = "serviceLoadMetrics") private List serviceLoadMetrics; /* - * A list that describes the correlation of the service with other - * services. + * A list that describes the correlation of the service with other services. */ @JsonProperty(value = "servicePlacementPolicies") private List servicePlacementPolicies; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java index 79101e4af884..7d9548a7e089 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceResourceUpdate.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.servicefabric.fluent.models.ServiceResourceUpdateProperties; -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 service resource for patch operations. */ @Fluent public final class ServiceResourceUpdate extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceUpdate.class); - /* * The service resource properties for patch operations. */ @@ -26,8 +22,7 @@ public final class ServiceResourceUpdate extends ProxyResource { private ServiceResourceUpdateProperties innerProperties; /* - * It will be deprecated in New API, resource location depends on the - * parent resource. + * It will be deprecated in New API, resource location depends on the parent resource. */ @JsonProperty(value = "location") private String location; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeDeltaHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeDeltaHealthPolicy.java index 51252259378f..d13067d05c54 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeDeltaHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeDeltaHealthPolicy.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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; /** @@ -15,16 +13,12 @@ */ @Fluent public final class ServiceTypeDeltaHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceTypeDeltaHealthPolicy.class); - /* - * The maximum allowed percentage of services health degradation allowed - * during cluster upgrades. - * The delta is measured between the state of the services at the beginning - * of upgrade and the state of the services at the time of the health - * evaluation. - * The check is performed after every upgrade domain upgrade completion to - * make sure the global state of the cluster is within tolerated limits. + * The maximum allowed percentage of services health degradation allowed during cluster upgrades. + * The delta is measured between the state of the services at the beginning of upgrade and the state of the + * services at the time of the health evaluation. + * The check is performed after every upgrade domain upgrade completion to make sure the global state of the + * cluster is within tolerated limits. * */ @JsonProperty(value = "maxPercentDeltaUnhealthyServices") diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeHealthPolicy.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeHealthPolicy.java index b8a5966a1027..7ee02076344f 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeHealthPolicy.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/ServiceTypeHealthPolicy.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.servicefabric.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; /** Represents the health policy used to evaluate the health of services belonging to a service type. */ @Fluent public final class ServiceTypeHealthPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceTypeHealthPolicy.class); - /* - * The maximum percentage of services allowed to be unhealthy before your - * application is considered in error. + * The maximum percentage of services allowed to be unhealthy before your application is considered in error. * */ @JsonProperty(value = "maxPercentUnhealthyServices") diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Services.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Services.java index e583b89bd2c7..e3e2714fbb14 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Services.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/Services.java @@ -10,7 +10,9 @@ /** Resource collection API of Services. */ public interface Services { /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -26,7 +28,9 @@ public interface Services { ServiceResource get(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param resourceGroupName The name of the resource group. @@ -38,13 +42,15 @@ public interface Services { * @throws com.azure.core.management.exception.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 Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -57,7 +63,9 @@ Response getWithResponse( void delete(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -72,7 +80,10 @@ void delete( String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context); /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -86,7 +97,10 @@ void delete( ServiceResourceList list(String resourceGroupName, String clusterName, String applicationName); /** - * Gets all service resources created or in the process of being created in the Service Fabric application resource. + * Gets the list of service resources created in the specified Service Fabric application resource. + * + *

Gets all service resources created or in the process of being created in the Service Fabric application + * resource. * * @param resourceGroupName The name of the resource group. * @param clusterName The name of the cluster resource. @@ -96,13 +110,15 @@ void delete( * @throws com.azure.core.management.exception.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 service resources created or in the process of being created in the Service Fabric application - * resource. + * resource along with {@link Response}. */ Response listWithResponse( String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param id the resource ID. @@ -110,12 +126,14 @@ Response listWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource along with {@link Response}. */ ServiceResource getById(String id); /** - * Get a Service Fabric service resource created or in the process of being created in the Service Fabric + * Gets a Service Fabric service resource. + * + *

Get a Service Fabric service resource created or in the process of being created in the Service Fabric * application resource. * * @param id the resource ID. @@ -124,12 +142,14 @@ Response listWithResponse( * @throws com.azure.core.management.exception.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 Service Fabric service resource created or in the process of being created in the Service Fabric - * application resource. + * application resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,7 +159,9 @@ Response listWithResponse( void deleteById(String id); /** - * Delete a Service Fabric service resource with the specified name. + * Deletes a Service Fabric service resource. + * + *

Delete a Service Fabric service resource with the specified name. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsParameterDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsParameterDescription.java index ab8b9f267d46..da3079c16389 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsParameterDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsParameterDescription.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 parameter in fabric settings of the cluster. */ @Fluent public final class SettingsParameterDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SettingsParameterDescription.class); - /* * The parameter name of fabric setting. */ @@ -73,16 +70,18 @@ public SettingsParameterDescription withValue(String value) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model SettingsParameterDescription")); } if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property value in model SettingsParameterDescription")); } } + + private static final ClientLogger LOGGER = new ClientLogger(SettingsParameterDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsSectionDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsSectionDescription.java index 2b940bf99fc0..e27eb3b06277 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsSectionDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SettingsSectionDescription.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 section in the fabric settings of the cluster. */ @Fluent public final class SettingsSectionDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SettingsSectionDescription.class); - /* * The section name of the fabric settings. */ @@ -74,12 +71,12 @@ public SettingsSectionDescription withParameters(List e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(SettingsSectionDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SfZonalUpgradeMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SfZonalUpgradeMode.java index 1546cd5f44a4..b6bdd278ea0d 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SfZonalUpgradeMode.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SfZonalUpgradeMode.java @@ -27,7 +27,11 @@ public static SfZonalUpgradeMode fromString(String name) { return fromString(name, SfZonalUpgradeMode.class); } - /** @return known SfZonalUpgradeMode values. */ + /** + * Gets known SfZonalUpgradeMode values. + * + * @return known SfZonalUpgradeMode values. + */ public static Collection values() { return values(SfZonalUpgradeMode.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SingletonPartitionSchemeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SingletonPartitionSchemeDescription.java index 303c8fab3ca4..96e7843d6b04 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SingletonPartitionSchemeDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/SingletonPartitionSchemeDescription.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.servicefabric.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.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,8 +13,6 @@ @JsonTypeName("Singleton") @Immutable public final class SingletonPartitionSchemeDescription extends PartitionSchemeDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SingletonPartitionSchemeDescription.class); - /** * Validates the instance. * diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java index 7e4924f3e76c..fcc6773461b0 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceProperties.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.servicefabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,12 +17,9 @@ @JsonTypeName("Stateful") @Fluent public final class StatefulServiceProperties extends ServiceResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StatefulServiceProperties.class); - /* - * A flag indicating whether this is a persistent service which stores - * states on the local disk. If it is then the value of this property is - * true, if not it is false. + * A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the + * value of this property is true, if not it is false. */ @JsonProperty(value = "hasPersistedState") private Boolean hasPersistedState; @@ -42,22 +37,22 @@ public final class StatefulServiceProperties extends ServiceResourceProperties { private Integer minReplicaSetSize; /* - * The duration between when a replica goes down and when a new replica is - * created, represented in ISO 8601 format (hh:mm:ss.s). + * The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format + * (hh:mm:ss.s). */ @JsonProperty(value = "replicaRestartWaitDuration") private OffsetDateTime replicaRestartWaitDuration; /* - * The maximum duration for which a partition is allowed to be in a state - * of quorum loss, represented in ISO 8601 format (hh:mm:ss.s). + * The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 + * format (hh:mm:ss.s). */ @JsonProperty(value = "quorumLossWaitDuration") private OffsetDateTime quorumLossWaitDuration; /* - * The definition on how long StandBy replicas should be maintained before - * being removed, represented in ISO 8601 format (hh:mm:ss.s). + * The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 + * format (hh:mm:ss.s). */ @JsonProperty(value = "standByReplicaKeepDuration") private OffsetDateTime standByReplicaKeepDuration; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java index 860dff844a1c..7186d49db27a 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatefulServiceUpdateProperties.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.servicefabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,8 +17,6 @@ @JsonTypeName("Stateful") @Fluent public final class StatefulServiceUpdateProperties extends ServiceResourceUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StatefulServiceUpdateProperties.class); - /* * The target replica set size as a number. */ @@ -34,22 +30,22 @@ public final class StatefulServiceUpdateProperties extends ServiceResourceUpdate private Integer minReplicaSetSize; /* - * The duration between when a replica goes down and when a new replica is - * created, represented in ISO 8601 format (hh:mm:ss.s). + * The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format + * (hh:mm:ss.s). */ @JsonProperty(value = "replicaRestartWaitDuration") private OffsetDateTime replicaRestartWaitDuration; /* - * The maximum duration for which a partition is allowed to be in a state - * of quorum loss, represented in ISO 8601 format (hh:mm:ss.s). + * The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 + * format (hh:mm:ss.s). */ @JsonProperty(value = "quorumLossWaitDuration") private OffsetDateTime quorumLossWaitDuration; /* - * The definition on how long StandBy replicas should be maintained before - * being removed, represented in ISO 8601 format (hh:mm:ss.s). + * The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 + * format (hh:mm:ss.s). */ @JsonProperty(value = "standByReplicaKeepDuration") private OffsetDateTime standByReplicaKeepDuration; diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java index ff0b74ac14d6..df53261c6453 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceProperties.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.servicefabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("Stateless") @Fluent public final class StatelessServiceProperties extends ServiceResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StatelessServiceProperties.class); - /* * The instance count. */ @@ -27,14 +23,11 @@ public final class StatelessServiceProperties extends ServiceResourceProperties private Integer instanceCount; /* - * Delay duration for RequestDrain feature to ensures that the endpoint - * advertised by the stateless instance is removed before the delay starts - * prior to closing the instance. This delay enables existing requests to - * drain gracefully before the instance actually goes down + * Delay duration for RequestDrain feature to ensures that the endpoint advertised by the stateless instance is + * removed before the delay starts prior to closing the instance. This delay enables existing requests to drain + * gracefully before the instance actually goes down * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). - * It is first interpreted as a string representing an ISO 8601 duration. - * If that fails, then it is interpreted as a number representing the total - * number of milliseconds. + * It is represented in ISO 8601 format (hh:mm:ss.s). */ @JsonProperty(value = "instanceCloseDelayDuration") private String instanceCloseDelayDuration; @@ -64,8 +57,7 @@ public StatelessServiceProperties withInstanceCount(Integer instanceCount) { * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay * enables existing requests to drain gracefully before the instance actually goes down * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). - * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a - * number representing the total number of milliseconds. + * It is represented in ISO 8601 format (hh:mm:ss.s). * * @return the instanceCloseDelayDuration value. */ @@ -78,8 +70,7 @@ public String instanceCloseDelayDuration() { * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay * enables existing requests to drain gracefully before the instance actually goes down * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). - * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a - * number representing the total number of milliseconds. + * It is represented in ISO 8601 format (hh:mm:ss.s). * * @param instanceCloseDelayDuration the instanceCloseDelayDuration value to set. * @return the StatelessServiceProperties object itself. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java index 8b83ea9f2ae2..af5cea884673 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StatelessServiceUpdateProperties.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.servicefabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceUpdateProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -18,8 +16,6 @@ @JsonTypeName("Stateless") @Fluent public final class StatelessServiceUpdateProperties extends ServiceResourceUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StatelessServiceUpdateProperties.class); - /* * The instance count. */ @@ -27,14 +23,12 @@ public final class StatelessServiceUpdateProperties extends ServiceResourceUpdat private Integer instanceCount; /* - * Delay duration for RequestDrain feature to ensures that the endpoint - * advertised by the stateless instance is removed before the delay starts - * prior to closing the instance. This delay enables existing requests to - * drain gracefully before the instance actually goes down + * Delay duration for RequestDrain feature to ensures that the endpoint advertised by the stateless instance is + * removed before the delay starts prior to closing the instance. This delay enables existing requests to drain + * gracefully before the instance actually goes down * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). - * It is first interpreted as a string representing an ISO 8601 duration. - * If that fails, then it is interpreted as a number representing the total - * number of milliseconds. + * It is first interpreted as a string representing an ISO 8601 duration. It is represented in ISO 8601 format + * (hh:mm:ss.s). */ @JsonProperty(value = "instanceCloseDelayDuration") private String instanceCloseDelayDuration; @@ -64,8 +58,8 @@ public StatelessServiceUpdateProperties withInstanceCount(Integer instanceCount) * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay * enables existing requests to drain gracefully before the instance actually goes down * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). - * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a - * number representing the total number of milliseconds. + * It is first interpreted as a string representing an ISO 8601 duration. It is represented in ISO 8601 format + * (hh:mm:ss.s). * * @return the instanceCloseDelayDuration value. */ @@ -78,8 +72,8 @@ public String instanceCloseDelayDuration() { * advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay * enables existing requests to drain gracefully before the instance actually goes down * (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). - * It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a - * number representing the total number of milliseconds. + * It is first interpreted as a string representing an ISO 8601 duration. It is represented in ISO 8601 format + * (hh:mm:ss.s). * * @param instanceCloseDelayDuration the instanceCloseDelayDuration value to set. * @return the StatelessServiceUpdateProperties object itself. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StoreName.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StoreName.java index 3fd497cc80cc..52475065a97c 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StoreName.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/StoreName.java @@ -45,7 +45,11 @@ public static StoreName fromString(String name) { return fromString(name, StoreName.class); } - /** @return known StoreName values. */ + /** + * Gets known StoreName values. + * + * @return known StoreName values. + */ public static Collection values() { return values(StoreName.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java index 2ac85fc5ae8f..7a21726c79db 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UniformInt64RangePartitionSchemeDescription.java @@ -6,7 +6,6 @@ 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 com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("UniformInt64Range") @Fluent public final class UniformInt64RangePartitionSchemeDescription extends PartitionSchemeDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UniformInt64RangePartitionSchemeDescription.class); - /* * The number of partitions. */ @@ -113,16 +110,18 @@ public UniformInt64RangePartitionSchemeDescription withHighKey(String highKey) { public void validate() { super.validate(); if (lowKey() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property lowKey in model UniformInt64RangePartitionSchemeDescription")); } if (highKey() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property highKey in model UniformInt64RangePartitionSchemeDescription")); } } + + private static final ClientLogger LOGGER = new ClientLogger(UniformInt64RangePartitionSchemeDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionsDescription.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionsDescription.java index 1ca9e8dfef6c..b8dd5a9f38a8 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionsDescription.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradableVersionsDescription.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 UpgradableVersionsDescription model. */ @Fluent public final class UpgradableVersionsDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpgradableVersionsDescription.class); - /* * The target code version. */ @@ -47,10 +44,12 @@ public UpgradableVersionsDescription withTargetVersion(String targetVersion) { */ public void validate() { if (targetVersion() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property targetVersion in model UpgradableVersionsDescription")); } } + + private static final ClientLogger LOGGER = new ClientLogger(UpgradableVersionsDescription.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradeMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradeMode.java index bdd153e93653..a2f8e69a7068 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradeMode.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UpgradeMode.java @@ -27,7 +27,11 @@ public static UpgradeMode fromString(String name) { return fromString(name, UpgradeMode.class); } - /** @return known UpgradeMode values. */ + /** + * Gets known UpgradeMode values. + * + * @return known UpgradeMode values. + */ public static Collection values() { return values(UpgradeMode.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UserAssignedIdentity.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UserAssignedIdentity.java index 9495684bf410..f96dd077ab50 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UserAssignedIdentity.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/UserAssignedIdentity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.servicefabric.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 UserAssignedIdentity model. */ @Immutable public class UserAssignedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class); - /* * The principal id of user assigned identity. */ diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/VmssZonalUpgradeMode.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/VmssZonalUpgradeMode.java index 70e62ea0b1c8..47f2d1e67dd8 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/VmssZonalUpgradeMode.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/models/VmssZonalUpgradeMode.java @@ -27,7 +27,11 @@ public static VmssZonalUpgradeMode fromString(String name) { return fromString(name, VmssZonalUpgradeMode.class); } - /** @return known VmssZonalUpgradeMode values. */ + /** + * Gets known VmssZonalUpgradeMode values. + * + * @return known VmssZonalUpgradeMode values. + */ public static Collection values() { return values(VmssZonalUpgradeMode.class); } diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java similarity index 84% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsCreateOrUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java index c7bbce9a8fbd..a9ea7063babd 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsCreateOrUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import java.util.HashMap; import java.util.Map; @@ -10,9 +10,7 @@ /** Samples for ApplicationTypeVersions CreateOrUpdate. */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * operationId: ApplicationTypeVersions_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application type version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsDeleteSamples.java similarity index 75% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsDeleteSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsDeleteSamples.java index c7860305b9eb..750eb3e3dfb0 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsDeleteSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsDeleteSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ApplicationTypeVersions Delete. */ public final class ApplicationTypeVersionsDeleteSamples { /* - * operationId: ApplicationTypeVersions_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete an application type version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsGetSamples.java similarity index 75% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsGetSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsGetSamples.java index bc9d95f17209..6d06ae8242b5 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsGetSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsGetSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ApplicationTypeVersions Get. */ public final class ApplicationTypeVersionsGetSamples { /* - * operationId: ApplicationTypeVersions_Get - * api-version: 2021-06-01 - * x-ms-examples: Get an application type version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsListSamples.java similarity index 75% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsListSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsListSamples.java index 6dc0dded4a3e..e39b632f50e8 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypeVersionsListSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsListSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ApplicationTypeVersions List. */ public final class ApplicationTypeVersionsListSamples { /* - * operationId: ApplicationTypeVersions_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of application type version resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeVersionListOperation_example.json */ /** * Sample code: Get a list of application type version resources. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesCreateOrUpdateSamples.java similarity index 83% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesCreateOrUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesCreateOrUpdateSamples.java index 1634989812db..6e2c8eed9a49 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesCreateOrUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import java.util.HashMap; import java.util.Map; @@ -10,9 +10,7 @@ /** Samples for ApplicationTypes CreateOrUpdate. */ public final class ApplicationTypesCreateOrUpdateSamples { /* - * operationId: ApplicationTypes_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application type + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNamePutOperation_example.json */ /** * Sample code: Put an application type. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesDeleteSamples.java similarity index 73% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesDeleteSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesDeleteSamples.java index 9fbd734b0b39..620523113654 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesDeleteSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesDeleteSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ApplicationTypes Delete. */ public final class ApplicationTypesDeleteSamples { /* - * operationId: ApplicationTypes_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete an application type + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameDeleteOperation_example.json */ /** * Sample code: Delete an application type. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesGetSamples.java similarity index 74% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesGetSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesGetSamples.java index 85e6a0eec950..46400a1a7108 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesGetSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesGetSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ApplicationTypes Get. */ public final class ApplicationTypesGetSamples { /* - * operationId: ApplicationTypes_Get - * api-version: 2021-06-01 - * x-ms-examples: Get an application type + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameGetOperation_example.json */ /** * Sample code: Get an application type. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesListSamples.java similarity index 75% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesListSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesListSamples.java index bcefac0a122e..7abdeefe766c 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationTypesListSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesListSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ApplicationTypes List. */ public final class ApplicationTypesListSamples { /* - * operationId: ApplicationTypes_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of application type name resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationTypeNameListOperation_example.json */ /** * Sample code: Get a list of application type name resources. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsCreateOrUpdateSamples.java similarity index 90% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsCreateOrUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsCreateOrUpdateSamples.java index 09334e7c2bfc..00a32e911a9e 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsCreateOrUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription; import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy; @@ -18,9 +18,7 @@ /** Samples for Applications CreateOrUpdate. */ public final class ApplicationsCreateOrUpdateSamples { /* - * operationId: Applications_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application with maximum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_example_max.json */ /** * Sample code: Put an application with maximum parameters. @@ -74,9 +72,7 @@ public static void putAnApplicationWithMaximumParameters( } /* - * operationId: Applications_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application with minimum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_example_min.json */ /** * Sample code: Put an application with minimum parameters. @@ -98,9 +94,7 @@ public static void putAnApplicationWithMinimumParameters( } /* - * operationId: Applications_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put an application with recreate option + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPutOperation_recreate_example.json */ /** * Sample code: Put an application with recreate option. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsDeleteSamples.java similarity index 73% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsDeleteSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsDeleteSamples.java index 7e05d287aa4a..68f711ca7e8a 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsDeleteSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsDeleteSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * operationId: Applications_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete an application + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationDeleteOperation_example.json */ /** * Sample code: Delete an application. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsGetSamples.java similarity index 74% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsGetSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsGetSamples.java index 29d88bd25167..e6cacbd86d10 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsGetSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsGetSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * operationId: Applications_Get - * api-version: 2021-06-01 - * x-ms-examples: Get an application + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationGetOperation_example.json */ /** * Sample code: Get an application. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsListSamples.java similarity index 75% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsListSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsListSamples.java index 07685a2bf5e1..5a7a9c7b1da7 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsListSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsListSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * operationId: Applications_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of application resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationListOperation_example.json */ /** * Sample code: Get a list of application resources. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsUpdateSamples.java similarity index 86% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsUpdateSamples.java index 6e90a78d85bc..0b596291413c 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ApplicationsUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription; @@ -12,9 +12,7 @@ /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * operationId: Applications_Update - * api-version: 2021-06-01 - * x-ms-examples: Patch an application + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetByEnvironmentSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsGetByEnvironmentSamples.java similarity index 78% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetByEnvironmentSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsGetByEnvironmentSamples.java index b95b6df9b85a..d41ac6b89ec2 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetByEnvironmentSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsGetByEnvironmentSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment; @@ -10,9 +10,7 @@ /** Samples for ClusterVersions GetByEnvironment. */ public final class ClusterVersionsGetByEnvironmentSamples { /* - * operationId: ClusterVersions_GetByEnvironment - * api-version: 2021-06-01 - * x-ms-examples: Get cluster version by environment + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsGetByEnvironment_example.json */ /** * Sample code: Get cluster version by environment. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsGetSamples.java similarity index 74% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsGetSamples.java index 91868c6ce2b4..2ad08e7daa71 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsGetSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsGetSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ClusterVersions Get. */ public final class ClusterVersionsGetSamples { /* - * operationId: ClusterVersions_Get - * api-version: 2021-06-01 - * x-ms-examples: Get cluster version + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsGet_example.json */ /** * Sample code: Get cluster version. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListByEnvironmentSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsListByEnvironmentSamples.java similarity index 79% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListByEnvironmentSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsListByEnvironmentSamples.java index 56cfc30749dc..384f986f546e 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListByEnvironmentSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsListByEnvironmentSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabric.models.ClusterVersionsEnvironment; @@ -10,9 +10,7 @@ /** Samples for ClusterVersions ListByEnvironment. */ public final class ClusterVersionsListByEnvironmentSamples { /* - * operationId: ClusterVersions_ListByEnvironment - * api-version: 2021-06-01 - * x-ms-examples: List cluster versions by environment + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsListByEnvironment.json */ /** * Sample code: List cluster versions by environment. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsListSamples.java similarity index 74% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsListSamples.java index 76694f21c036..77dee51de127 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClusterVersionsListSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClusterVersionsListSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for ClusterVersions List. */ public final class ClusterVersionsListSamples { /* - * operationId: ClusterVersions_List - * api-version: 2021-06-01 - * x-ms-examples: List cluster versions + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterVersionsList_example.json */ /** * Sample code: List cluster versions. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersCreateOrUpdateSamples.java similarity index 97% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersCreateOrUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersCreateOrUpdateSamples.java index d51587da1530..747ec09c0150 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersCreateOrUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.resourcemanager.servicefabric.models.AddOnFeatures; import com.azure.resourcemanager.servicefabric.models.ApplicationDeltaHealthPolicy; @@ -43,9 +43,7 @@ /** Samples for Clusters CreateOrUpdate. */ public final class ClustersCreateOrUpdateSamples { /* - * operationId: Clusters_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a cluster with maximum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPutOperation_example_max.json */ /** * Sample code: Put a cluster with maximum parameters. @@ -222,9 +220,7 @@ public static void putAClusterWithMaximumParameters( } /* - * operationId: Clusters_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a cluster with minimum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPutOperation_example_min.json */ /** * Sample code: Put a cluster with minimum parameters. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersDeleteSamples.java similarity index 73% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersDeleteSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersDeleteSamples.java index d34e5a407cdc..03a4187090cb 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersDeleteSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersDeleteSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * operationId: Clusters_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete a cluster + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterDeleteOperation_example.json */ /** * Sample code: Delete a cluster. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersGetByResourceGroupSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersGetByResourceGroupSamples.java similarity index 74% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersGetByResourceGroupSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersGetByResourceGroupSamples.java index 889dffb0a4e9..e486daec0a8b 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersGetByResourceGroupSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersGetByResourceGroupSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * operationId: Clusters_Get - * api-version: 2021-06-01 - * x-ms-examples: Get a cluster + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterGetOperation_example.json */ /** * Sample code: Get a cluster. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListByResourceGroupSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListByResourceGroupSamples.java similarity index 74% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListByResourceGroupSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListByResourceGroupSamples.java index 2b0b29ffb08c..1f6cf1c5d596 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListByResourceGroupSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListByResourceGroupSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * operationId: Clusters_ListByResourceGroup - * api-version: 2021-06-01 - * x-ms-examples: List cluster by resource group + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterListByResourceGroupOperation_example.json */ /** * Sample code: List cluster by resource group. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListSamples.java similarity index 72% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListSamples.java index a7efa640c451..1dceab44be97 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * operationId: Clusters_List - * api-version: 2021-06-01 - * x-ms-examples: List clusters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterListOperation_example.json */ /** * Sample code: List clusters. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListUpgradableVersionsSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListUpgradableVersionsSamples.java similarity index 77% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListUpgradableVersionsSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListUpgradableVersionsSamples.java index 4f72de7f4caf..518884329cdf 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersListUpgradableVersionsSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersListUpgradableVersionsSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription; @@ -10,9 +10,7 @@ /** Samples for Clusters ListUpgradableVersions. */ public final class ClustersListUpgradableVersionsSamples { /* - * operationId: Clusters_ListUpgradableVersions - * api-version: 2021-06-01 - * x-ms-examples: Get minimum and maximum code versions + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListUpgradableVersionsMinMax_example.json */ /** * Sample code: Get minimum and maximum code versions. @@ -25,9 +23,7 @@ public static void getMinimumAndMaximumCodeVersions( } /* - * operationId: Clusters_ListUpgradableVersions - * api-version: 2021-06-01 - * x-ms-examples: Get upgrade path + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListUpgradableVersionsPath_example.json */ /** * Sample code: Get upgrade path. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersUpdateSamples.java similarity index 94% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersUpdateSamples.java index a1d9f7b601cf..55abfac40996 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ClustersUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ClustersUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabric.models.Cluster; @@ -20,9 +20,7 @@ /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * operationId: Clusters_Update - * api-version: 2021-06-01 - * x-ms-examples: Patch a cluster + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ClusterPatchOperation_example.json */ /** * Sample code: Patch a cluster. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/OperationsListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/OperationsListSamples.java new file mode 100644 index 000000000000..87aaadc3b7a7 --- /dev/null +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/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.servicefabric.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ListOperations.json + */ + /** + * Sample code: ListOperations. + * + * @param manager Entry point to ServiceFabricManager. + */ + public static void listOperations(com.azure.resourcemanager.servicefabric.ServiceFabricManager manager) { + manager.operations().list(Context.NONE); + } +} diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesCreateOrUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesCreateOrUpdateSamples.java similarity index 89% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesCreateOrUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesCreateOrUpdateSamples.java index 4a99a019d77a..65666bf41dbf 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesCreateOrUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode; import com.azure.resourcemanager.servicefabric.models.MoveCost; @@ -18,9 +18,7 @@ /** Samples for Services CreateOrUpdate. */ public final class ServicesCreateOrUpdateSamples { /* - * operationId: Services_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a service with minimum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePutOperation_example_min.json */ /** * Sample code: Put a service with minimum parameters. @@ -40,9 +38,7 @@ public static void putAServiceWithMinimumParameters( } /* - * operationId: Services_CreateOrUpdate - * api-version: 2021-06-01 - * x-ms-examples: Put a service with maximum parameters + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePutOperation_example_max.json */ /** * Sample code: Put a service with maximum parameters. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesDeleteSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesDeleteSamples.java similarity index 73% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesDeleteSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesDeleteSamples.java index 0efe55251589..a769d7e8a86a 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesDeleteSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesDeleteSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Services Delete. */ public final class ServicesDeleteSamples { /* - * operationId: Services_Delete - * api-version: 2021-06-01 - * x-ms-examples: Delete a service + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceDeleteOperation_example.json */ /** * Sample code: Delete a service. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesGetSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesGetSamples.java similarity index 74% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesGetSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesGetSamples.java index ccaeaa79ffe0..6dc947ac4e83 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesGetSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesGetSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Services Get. */ public final class ServicesGetSamples { /* - * operationId: Services_Get - * api-version: 2021-06-01 - * x-ms-examples: Get a service + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceGetOperation_example.json */ /** * Sample code: Get a service. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesListSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesListSamples.java similarity index 75% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesListSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesListSamples.java index 792e8f548002..6b494fbbe7c7 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesListSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesListSamples.java @@ -2,16 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; /** Samples for Services List. */ public final class ServicesListSamples { /* - * operationId: Services_List - * api-version: 2021-06-01 - * x-ms-examples: Get a list of service resources + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServiceListOperation_example.json */ /** * Sample code: Get a list of service resources. diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesUpdateSamples.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesUpdateSamples.java similarity index 78% rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesUpdateSamples.java rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesUpdateSamples.java index ae302939d269..08d79e5e286a 100644 --- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/ServicesUpdateSamples.java +++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/samples/java/com/azure/resourcemanager/servicefabric/generated/ServicesUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.servicefabric; +package com.azure.resourcemanager.servicefabric.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabric.models.ServiceResource; @@ -10,9 +10,7 @@ /** Samples for Services Update. */ public final class ServicesUpdateSamples { /* - * operationId: Services_Update - * api-version: 2021-06-01 - * x-ms-examples: Patch a service + * x-ms-original-file: specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/examples/ServicePatchOperation_example.json */ /** * Sample code: Patch a service.